Explorar el Código

Merge pull request #312 from richardwillars/updateAll

updateAll method uses iteratePlugins method
Renée Kooi hace 7 años
padre
commit
fb5a7fb5cf
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      src/core/Core.js

+ 2 - 4
src/core/Core.js

@@ -116,10 +116,8 @@ class Uppy {
    *
    */
   updateAll (state) {
-    Object.keys(this.plugins).forEach((pluginType) => {
-      this.plugins[pluginType].forEach((plugin) => {
-        plugin.update(state)
-      })
+    this.iteratePlugins(plugin => {
+      plugin.update(state)
     })
   }