mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: cli: fix ObjectID convert & serializer
This commit is contained in:
1 parent
4ccb9f3283
commit
981b21160f
3 files changed
+7
-12
No files matched your search
@@ -63,7 +63,7 @@ async function cli() {
|
||||
return console.error(parameters.join(', '));
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user