From d0409cbe43236d95022cadad5f6af46de53c9eaa Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Thu, 17 Jun 2021 22:22:59 +0900 Subject: [PATCH] refactor: use "forEach" instead of "for of" due to rollup not supporting it --- src/plugins/devtool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/devtool.js b/src/plugins/devtool.js index 8d6237b14..7b9b26a54 100644 --- a/src/plugins/devtool.js +++ b/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])