zamis 5 лет назад
Родитель
Сommit
2307273762
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      src/server/service/file-uploader/gridfs.js

+ 2 - 4
src/server/service/file-uploader/gridfs.js

@@ -44,10 +44,8 @@ module.exports = function(crowi) {
   };
 
   lib.deleteFiles = async function(attachments) {
-    const filenameValues = [];
-    attachments.map((attachment) => {
-      filenameValues.push(attachment.fileName);
-      return;
+    const filenameValues = attachments.map((attachment) => {
+      return attachment.fileName;
     });
 
     const fileIds = await AttachmentFile.find({ filename: { $in: filenameValues } }, { _id: 1 });