mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Fix error with undefined this.callback
This commit is contained in:
parent
1eca96cf11
commit
baac1d8dde
@ -13,7 +13,7 @@
|
||||
v-if="buttonText && (linkTo || callback)"
|
||||
class="test-message-button"
|
||||
:to="linkTo ? linkTo + (code ? `/${code}` : '') : null"
|
||||
@click="callback()"
|
||||
@click="optionalCallback()"
|
||||
>
|
||||
<!-- eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys-->
|
||||
{{ buttonText }}
|
||||
@ -36,5 +36,12 @@ export default {
|
||||
callback: { type: Function, required: false, default: null },
|
||||
code: { type: String, required: false, default: null }, // Wolle: to be removed by adding it directly to the "linkTo"
|
||||
},
|
||||
methods: {
|
||||
optionalCallback() {
|
||||
if (this.callback) {
|
||||
this.callback()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user