chore: check for no results
This commit is contained in:
parent
19b772f8ee
commit
af6385bc60
1 changed files with 7 additions and 4 deletions
|
@ -9,10 +9,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<x-button
|
<x-button
|
||||||
@click="copy(caldavUrl)"
|
@click="copy(caldavUrl)"
|
||||||
:shadow="false"
|
:shadow="false"
|
||||||
v-tooltip="$t('misc.copy')"
|
v-tooltip="$t('misc.copy')"
|
||||||
icon="paste"
|
icon="paste"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -109,6 +109,9 @@ const deleteToken = async (token: CaldavTokenModel) => {
|
||||||
const r = await service.delete(token)
|
const r = await service.delete(token)
|
||||||
success(r)
|
success(r)
|
||||||
const i = tokens.value.findIndex(v => v.id === token.id)
|
const i = tokens.value.findIndex(v => v.id === token.id)
|
||||||
|
if (i === -1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
tokens.value.splice(i, 1)
|
tokens.value.splice(i, 1)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue