Fix removing checks

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-09-02 12:32:45 +02:00
parent 2364fc84d7
commit c665d5475a
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 4 additions and 3 deletions

View File

@ -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)
}
}
}