mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: cli: fix objectId arg
This commit is contained in:
1 parent
fea6a6285f
commit
a2f5e7ac20
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.22.5",
|
"version": "2.22.6",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ async function cli() {
|
|||||||
return console.error(parameters.join(', '));
|
return console.error(parameters.join(', '));
|
||||||
}
|
}
|
||||||
for (let i = 0; i < args.length; i++) {
|
for (let i = 0; i < args.length; i++) {
|
||||||
if (ObjectID.isValid(args[i])) {
|
if (args[i].length === 24 && ObjectID.isValid(args[i])) {
|
||||||
args[i] = new ObjectID(args[i]);
|
args[i] = new ObjectID(args[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user