@xelqun/forms 0.5.0 → 0.6.0
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/package.json +1 -1
- package/resources/js/plugin.ts +3 -2
package/package.json
CHANGED
package/resources/js/plugin.ts
CHANGED
|
@@ -107,9 +107,10 @@ function mountNotifications(label?: string): () => void {
|
|
|
107
107
|
const host = document.body.appendChild(document.createElement('div'));
|
|
108
108
|
const toaster = createApp(XqNotifications, { label });
|
|
109
109
|
const stopListening = router.on('flash', (event) => {
|
|
110
|
-
|
|
110
|
+
// An app can type its flash data, and this key is ours, not part of that type.
|
|
111
|
+
const flash = event.detail.flash as Record<string, unknown>;
|
|
111
112
|
|
|
112
|
-
(
|
|
113
|
+
(flash[FLASH_KEY] as XqNotification[] | undefined)?.forEach(notify);
|
|
113
114
|
});
|
|
114
115
|
|
|
115
116
|
toaster.mount(host);
|