Przeglądaj źródła

Fix Exception in callback of async function: TypeError: this._now is not a function.

Thanks to xet7 !
Lauri Ojansivu 2 lat temu
rodzic
commit
aeb0f1e6d8
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      models/attachments.js

+ 1 - 0
models/attachments.js

@@ -95,6 +95,7 @@ Attachments = new FilesCollection({
       fileObj.versions[versionName].storage = STORAGE_NAME_FILESYSTEM;
     });
 
+    this._now = new Date();
     Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } });
     Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } });