Jelajahi Sumber

Merge pull request #312 from richardwillars/updateAll

updateAll method uses iteratePlugins method
Renée Kooi 7 tahun lalu
induk
melakukan
fb5a7fb5cf
1 mengubah file dengan 2 tambahan dan 4 penghapusan
  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)
     })
   }