Browse Source

transloadit: Remove event listener correctly on uninstall

Renée Kooi 7 years ago
parent
commit
11b820e68c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/plugins/Transloadit/index.js

+ 4 - 0
src/plugins/Transloadit/index.js

@@ -477,6 +477,10 @@ module.exports = class Transloadit extends Plugin {
   uninstall () {
     this.core.removePreProcessor(this.prepareUpload)
     this.core.removePostProcessor(this.afterUpload)
+
+    if (this.opts.importFromUploadURLs) {
+      this.core.off('core:upload-success', this.onFileUploadURLAvailable)
+    }
   }
 
   getAssembly (id) {