Update button rendering in AddPersons.vue

This commit modifies the button rendering in AddPersons.vue component to ensure that it doesn't crash if 'buttonTitle' is undefined. It does so by providing an empty string as a fallback in case 'buttonTitle' is unavailable, improving the component's stability.
This commit is contained in:
Julien Fastré 2024-06-11 09:39:32 +02:00
parent 83883567a2
commit 1993fac1c4
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -1,6 +1,6 @@
<template> <template>
<a class="btn" :class="getClassButton" :title="$t(buttonTitle)" @click="openModal"> <a class="btn" :class="getClassButton" :title="$t(buttonTitle || '')" @click="openModal">
<span v-if="displayTextButton">{{ $t(buttonTitle) }}</span> <span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span>
</a> </a>
<teleport to="body"> <teleport to="body">