From c2d79450eaf356fcb639850b0c65fb92cf90a16d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 8 Dec 2020 00:32:00 +0900 Subject: Pagesで変数削除するとそれ以外の変数が複製されるみたいなバグを修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/pages/page-editor/page-editor.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue index abf3264b48..5c3bd3aa66 100644 --- a/src/client/pages/page-editor/page-editor.vue +++ b/src/client/pages/page-editor/page-editor.vue @@ -342,12 +342,7 @@ export default defineComponent({ }, removeVariable(v) { - const i = this.variables.findIndex(x => x.name === v.name); - const newValue = [ - ...this.variables.slice(0, i), - ...this.variables.slice(i + 1) - ]; - this.variables = newValue; + this.variables = this.variables.filter(x => x.name !== v.name); }, getPageBlockList() { -- cgit v1.2.3-freya