diff --git a/packages/ui-default/pages/contest_balloon.page.tsx b/packages/ui-default/pages/contest_balloon.page.tsx index bae997895..b876d5812 100644 --- a/packages/ui-default/pages/contest_balloon.page.tsx +++ b/packages/ui-default/pages/contest_balloon.page.tsx @@ -65,11 +65,8 @@ function Balloon({ tdoc, val }) { } async function handleSetColor(tdoc) { - let val = tdoc.balloon; - if (!val) { - val = {}; - for (const pid of tdoc.pids) val[+pid] = { color: '#ffffff', name: '' }; - } + const val = tdoc.balloon || {}; + for (const pid of tdoc.pids) val[+pid] ||= { color: '#ffffff', name: '' }; Notification.info(i18n('Loading...')); const action = await new ActionDialog({ $body: tpl(<>