mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: training.getList: use string as index
This commit is contained in:
1 parent
a908252c57
commit
bbca622353
1 file changed
+1
-1
@@ -112,7 +112,7 @@ export async function getList(domainId: string, tids: ObjectID[]) {
|
|||||||
domainId, { _id: { $in: Array.from(new Set(tids)) } },
|
domainId, { _id: { $in: Array.from(new Set(tids)) } },
|
||||||
).toArray();
|
).toArray();
|
||||||
const r = {};
|
const r = {};
|
||||||
for (const tdoc of tdocs) r[tdoc.docId] = tdoc;
|
for (const tdoc of tdocs) r[tdoc.docId.toString()] = tdoc;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user