ui: fix display

This commit is contained in:
undefined committed 2021-06-29 21:37:19 +08:00
1 parent 791877098b
commit bc4d424abf
6 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
// eslint-disable-next-line prefer-const
let [udoc, pdoc] = await Promise.all([
user.getById(this.domainId, rdoc.uid),
problem.get(this.domainId, rdoc.pid, null),
problem.get(this.domainId, rdoc.pid),
]);
if (pdoc) {
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;