core: 修复rating计算错误的问题

This commit is contained in:
undefined committed 2021-06-20 10:56:00 +08:00
1 parent ecadd08cec
commit 5cae54ed0a
4 files changed
+6 -5

No files matched your search

+1
View File
@@ -50,3 +50,4 @@ node_modules/
__*
!__mocks__
!.gitkeep
*.local
+3 -3
View File
@@ -31,7 +31,7 @@
"@shelf/jest-mongodb": "^1.2.5",
"@types/cross-spawn": "^6.0.2",
"@types/jest": "^26.0.23",
"@types/node": "^15.12.2",
"@types/node": "^15.12.4",
"@types/semver": "^7.3.6",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
@@ -43,7 +43,7 @@
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.23.4",
"fs-extra": "^10.0.0",
"globby": "^11.0.3",
"globby": "^11.0.4",
"jest": "^27.0.4",
"latest-version": "^5.1.0",
"mongodb": "^3.6.9",
@@ -51,7 +51,7 @@
"ora": "^5.4.1",
"semver": "^7.3.5",
"ts-jest": "^27.0.3",
"typedoc": "^0.20.36",
"typedoc": "^0.20.37",
"typescript": "4.2.4"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.28.41",
"version": "2.28.42",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+1 -1
View File
@@ -120,7 +120,7 @@ export async function calcLevel(domainId: string, report: Function) {
async function runInDomain(id: string, isSub: boolean, report: Function) {
const info = await domain.getUnion(id);
info.union.push(id);
if (info) info.union.push(id);
const udict: ND = {};
const deltaudict: ND = {};
const domainId = info ? { $in: info.union } : { $exists: false };