Преглед изворни кода

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

Thanks to xet7 !
Lauri Ojansivu пре 2 година
родитељ
комит
aef6967d4c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      models/attachments.js

+ 1 - 1
models/attachments.js

@@ -97,7 +97,7 @@ Attachments = new FilesCollection({
 
     this._now = new Date();
     Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } });
-    Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } });
+    Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now } });
 
     let storageDestination = fileObj.meta.copyStorage || STORAGE_NAME_GRIDFS;
     Meteor.defer(() => Meteor.call('validateAttachmentAndMoveToStorage', fileObj._id, storageDestination));