chore: use findIndex to remove caldav token
This commit is contained in:
parent
cb067461aa
commit
0299ed32f3
1 changed files with 4 additions and 7 deletions
|
@ -109,13 +109,10 @@ const deleteToken = (token: CaldavTokenModel) => {
|
|||
// @ts-ignore
|
||||
.then(r => {
|
||||
success(r)
|
||||
for (const i in tokens.value) {
|
||||
// @ts-ignore
|
||||
if (tokens.value[i].id === token.id) {
|
||||
// @ts-ignore
|
||||
tokens.value.splice(i, 1)
|
||||
}
|
||||
}
|
||||
// @ts-ignore
|
||||
const i = tokens.value.findIndex(v => v.id === token.id)
|
||||
// @ts-ignore
|
||||
tokens.value.splice(i, 1)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue