Kaynağa Gözat

transloadit: Fix crash when `waitFor` options are false

Fix by @stevegeek
Closes #279
Renée Kooi 7 yıl önce
ebeveyn
işleme
33f1388f6c
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/plugins/Transloadit/index.js

+ 2 - 2
src/plugins/Transloadit/index.js

@@ -286,9 +286,9 @@ module.exports = class Transloadit extends Plugin {
     // the socket immediately and finish the upload.
     if (!this.shouldWait()) {
       const file = this.core.getFile(fileID)
-      const socket = this.socket[file.assembly]
+      const socket = this.sockets[file.transloadit.assembly]
       socket.close()
-      return
+      return Promise.resolve()
     }
 
     return new Promise((resolve, reject) => {