mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix linkedFile.delete
This commit is contained in:
1 file changed
+1
-1
@@ -57,7 +57,7 @@ export class StorageModel {
|
||||
const processedIds = [];
|
||||
for (const i of linked || []) {
|
||||
if (processedIds.includes(i.link)) continue;
|
||||
const current = affected.find((t) => t._id === t.link); // to be deleted
|
||||
const current = affected.find((t) => t._id === i.link); // to be deleted
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await Promise.all([
|
||||
StorageModel.coll.updateOne({ _id: current._id }, { $set: omit(i, ['_id']) }),
|
||||
|
||||
Reference in new issue
Block a user