chore: use findIndex to remove caldav token

This commit is contained in:
kolaente 2021-12-14 21:30:01 +01:00
parent cb067461aa
commit 0299ed32f3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 7 deletions

View File

@ -109,13 +109,10 @@ const deleteToken = (token: CaldavTokenModel) => {
// @ts-ignore // @ts-ignore
.then(r => { .then(r => {
success(r) success(r)
for (const i in tokens.value) { // @ts-ignore
// @ts-ignore const i = tokens.value.findIndex(v => v.id === token.id)
if (tokens.value[i].id === token.id) { // @ts-ignore
// @ts-ignore tokens.value.splice(i, 1)
tokens.value.splice(i, 1)
}
}
}) })
} }
</script> </script>