Sfoglia il codice sorgente

refactor: use "forEach" instead of "for of" due to rollup not supporting it

Kia King Ishii 3 anni fa
parent
commit
d0409cbe43
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/plugins/devtool.js

+ 2 - 2
src/plugins/devtool.js

@@ -246,7 +246,7 @@ function transformPathsToObjectTree (getters) {
     if (path.length > 1) {
       let target = result
       const leafKey = path.pop()
-      for (const p of path) {
+      path.forEach((p) => {
         if (!target[p]) {
           target[p] = {
             _custom: {
@@ -258,7 +258,7 @@ function transformPathsToObjectTree (getters) {
           }
         }
         target = target[p]._custom.value
-      }
+      })
       target[leafKey] = canThrow(() => getters[key])
     } else {
       result[key] = canThrow(() => getters[key])