diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d63b62184..c79a14cba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,7 @@ jobs: yarn set version stable yarn yarn dedupe + node build/prepare.js env: LICENSE_KEY: ${{ secrets.MAXMIND_KEY }} - name: Get specific changed files diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index 8adc71bcc..6f247de37 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -418,7 +418,8 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler { contest.getRelated(this.args.domainId, this.pdoc.docId), contest.getRelated(this.args.domainId, this.pdoc.docId, 'homework'), ])).map((tdocs) => tdocs.filter((tdoc) => - this.user.hasPerm(PERM.PERM_VIEW_HIDDEN_CONTEST) || !tdoc.assign?.length || new Set(tdoc.assign).intersection(new Set(this.user.group)).size, + this.user.hasPerm(PERM.PERM_VIEW_HIDDEN_CONTEST) || !tdoc.assign?.length + || new Set(tdoc.assign).intersection(new Set(this.user.group)).size, )); } } diff --git a/packages/hydrooj/src/upgrade.ts b/packages/hydrooj/src/upgrade.ts index 72d51edee..cebbddbf6 100644 --- a/packages/hydrooj/src/upgrade.ts +++ b/packages/hydrooj/src/upgrade.ts @@ -431,7 +431,7 @@ export const coreScripts: MigrationScript[] = [ let pinnedDomains = new Set(); for (const d of udoc.pinnedDomains) { if (typeof d === 'string') pinnedDomains.add(d); - else pinnedDomains = Set.union(pinnedDomains, d); + else pinnedDomains = pinnedDomains.union(new Set(d)); } await user.setById(udoc._id, { pinnedDomains: Array.from(pinnedDomains) }); }); diff --git a/packages/ui-default/pages/home_messages.page.tsx b/packages/ui-default/pages/home_messages.page.tsx index 86bbfd4c1..7e2876d8c 100644 --- a/packages/ui-default/pages/home_messages.page.tsx +++ b/packages/ui-default/pages/home_messages.page.tsx @@ -58,7 +58,7 @@ const page = new NamedPage('home_messages', () => { credential: document.cookie.split('sid=')[1].split(';')[0], channels: ['message'], })); - } + }; sock.onmessage = (message) => { const msg = JSON.parse(message.data); if (msg.operation !== 'event') return;