Skip to content

Commit

Permalink
refactor: use "forEach" instead of "for of" due to rollup not support…
Browse files Browse the repository at this point in the history
…ing it
  • Loading branch information
kiaking committed Jun 17, 2021
1 parent 8f66c8b commit d0409cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/devtool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -258,7 +258,7 @@ function transformPathsToObjectTree (getters) {
}
}
target = target[p]._custom.value
}
})
target[leafKey] = canThrow(() => getters[key])
} else {
result[key] = canThrow(() => getters[key])
Expand Down

0 comments on commit d0409cb

Please sign in to comment.