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() {