Explorar el Código

Add verys important return to ensure Promise chain works

rugk hace 7 años
padre
commit
17131f3172
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      js/privatebin.js

+ 1 - 1
js/privatebin.js

@@ -3943,7 +3943,7 @@ jQuery.PrivateBin = (function($, sjcl, RawDeflate) {
 
 
             // TODO: change this callback to also use Promises instead,
             // TODO: change this callback to also use Promises instead,
             // this here just waits
             // this here just waits
-            Promise.all([encryptAttachmentPromise, encryptAttachmentNamePromise]).then(() => {
+            return Promise.all([encryptAttachmentPromise, encryptAttachmentNamePromise]).then(() => {
                 // run callback
                 // run callback
                 return callback();
                 return callback();
             });
             });