fix(useToast)!: don't return a promise on add

This commit is contained in:
Benjamin Canac
2025-02-05 12:44:22 +01:00
parent 533e889589
commit 153f341a8c

View File

@@ -33,7 +33,7 @@ export function useToast() {
running.value = false
}
async function add(toast: Partial<Toast>): Promise<Toast> {
function add(toast: Partial<Toast>): Toast {
const body = {
id: generateId(),
open: true,
@@ -42,7 +42,7 @@ export function useToast() {
queue.push(body)
await processQueue()
processQueue()
return body
}