diff --git a/app/javascript/dashboard/components/SnackbarContainer.vue b/app/javascript/dashboard/components/SnackbarContainer.vue index 15123ca7a..3ab3d67fc 100644 --- a/app/javascript/dashboard/components/SnackbarContainer.vue +++ b/app/javascript/dashboard/components/SnackbarContainer.vue @@ -34,11 +34,13 @@ export default { beforeDestroy() { bus.$off('newToastMessage', this.onNewToastMessage); }, - onNewToastMessage(message) { - this.snackMessages.push({ key: new Date().getTime(), message }); - window.setTimeout(() => { - this.snackMessages.splice(0, 1); - }, this.duration); + methods: { + onNewToastMessage(message) { + this.snackMessages.push({ key: new Date().getTime(), message }); + window.setTimeout(() => { + this.snackMessages.splice(0, 1); + }, this.duration); + }, }, };