fix: sentry error

This commit is contained in:
Andras Bacsai
2024-11-25 12:55:05 +01:00
parent e3fb15d2a8
commit 56365368e3

View File

@@ -11,6 +11,7 @@
toast(this.title, { description: this.description, type: this.type, position: this.position, html: html })
}
}" x-init="window.toast = function(message, options = {}) {
try {
let description = '';
let type = 'default';
let position = 'top-center';
@@ -21,6 +22,9 @@
if (typeof options.html != 'undefined') html = options.html;
window.dispatchEvent(new CustomEvent('toast-show', { detail: { type: type, message: message, description: description, position: position, html: html } }));
} catch (error) {
console.error('Error showing toast:', error);
}
}" class="relative space-y-5">
<template x-teleport="body">
<ul x-data="{