vanilla-jui 1.5.9 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/primitives/toast.ts +3 -2
package/package.json
CHANGED
package/src/primitives/toast.ts
CHANGED
|
@@ -156,9 +156,10 @@ async function closeByUser(
|
|
|
156
156
|
toast: HTMLElement,
|
|
157
157
|
options: ToastOptions
|
|
158
158
|
): Promise<void> {
|
|
159
|
-
|
|
160
|
-
await options.onClose?.();
|
|
159
|
+
const shouldCancel = isToastLoading(options);
|
|
161
160
|
hide(toast);
|
|
161
|
+
if (shouldCancel) await options.onCancel?.();
|
|
162
|
+
await options.onClose?.();
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
function bindToastStatus(
|