fix: dispatch auth event on window for Alpine.js compatibility
Alpine's .window modifier listens on window, not document. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
function dispatch(loggedIn) {
|
||||
document.dispatchEvent(new CustomEvent('indiekit:auth', { detail: { loggedIn: loggedIn } }));
|
||||
window.dispatchEvent(new CustomEvent('indiekit:auth', { detail: { loggedIn: loggedIn } }));
|
||||
if (loggedIn) {
|
||||
document.body.setAttribute('data-indiekit-auth', 'true');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user