Skip to content

Commit

Permalink
ui: contest_balloon: fix default value
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe committed Dec 21, 2024
1 parent fdb4f18 commit f024f75
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/ui-default/pages/contest_balloon.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(<>
Expand Down

0 comments on commit f024f75

Please sign in to comment.