From c665d5475affc844e583a8a546466ae27c045bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 2 Sep 2019 12:32:45 +0200 Subject: [PATCH] Fix removing checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/workflowengine/src/components/Rule.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/workflowengine/src/components/Rule.vue b/apps/workflowengine/src/components/Rule.vue index d3cf7291af4..fab79109516 100644 --- a/apps/workflowengine/src/components/Rule.vue +++ b/apps/workflowengine/src/components/Rule.vue @@ -135,11 +135,12 @@ export default { cancelRule() { this.$store.dispatch('removeRule', this.rule) }, - removeCheck(check) { + async removeCheck(check) { const index = this.rule.checks.findIndex(item => item === check) - if (index < 0) { - this.rule.checks.splice(index, 1) + if (index > -1) { + this.$delete(this.rule.checks, index) } + this.$store.dispatch('updateRule', this.rule) } } }