Explorar el Código

fix null position

zamis hace 5 años
padre
commit
0d21b6dd7e
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/server/service/page.js

+ 2 - 1
src/server/service/page.js

@@ -41,11 +41,12 @@ class PageService {
     const readable = new Readable({ objectMode: true });
 
     readable.push(pageIds);
+    readable.push(null);
+
     readable.on('data', async(chunk) => {
       const attachments = await Attachment.find({ page: chunk });
       attachmentService.removeAttachment(attachments);
     });
-    readable.push(null);
     return;
   }