core&ui: performance optimization

This commit is contained in:
undefined committed 2022-11-27 16:16:21 +08:00
1 parent b1e5c77a56
commit 73aa641258
7 files changed
+31 -22

No files matched your search

+1 -1
View File
@@ -171,7 +171,7 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
canViewCode ||= tsdoc?.attend;
}
if (!tsdoc?.attend && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
} else if (!problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
} else if (pdoc && !problem.canViewBy(pdoc, this.user)) throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
if (!canViewCode) {
rdoc.code = '';
rdoc.files = {};