mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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)) } },
|
||||
).toArray();
|
||||
const r = {};
|
||||
for (const tdoc of tdocs) r[tdoc.docId] = tdoc;
|
||||
for (const tdoc of tdocs) r[tdoc.docId.toString()] = tdoc;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user