core: search: remove duplicate

This commit is contained in:
undefined committed 2021-06-19 15:10:17 +08:00
1 parent d5e86d6bdb
commit c0e67917a2
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.28.39",
"version": "2.28.40",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+1 -1
View File
@@ -100,7 +100,7 @@ export class ProblemMainHandler extends ProblemHandler {
if (sort) pdocs = pdocs.sort((a, b) => sort.indexOf(a.docId) - sort.indexOf(b.docId));
if (q && +q) {
const pdoc = await problem.get(domainId, +q, problem.PROJECTION_LIST);
if (pdoc) pdocs.unshift(pdoc);
if (pdoc) pdocs.filter((doc) => doc.docId !== pdoc.docId).unshift(pdoc);
}
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
psdict = await problem.getListStatus(