We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3041fd commit 5277825Copy full SHA for 5277825
1 file changed
landing/src/pages/index.astro
@@ -102,8 +102,17 @@ import MainPage from '@layouts/MainPage.astro';
102
shepherd.start();
103
}
104
105
+ // Clean up previous listener if it exists
106
+ if ((window as any).__startTourAbortController) {
107
+ (window as any).__startTourAbortController.abort();
108
+ }
109
+
110
+ // Create new AbortController for this listener
111
+ const controller = new AbortController();
112
+ (window as any).__startTourAbortController = controller;
113
114
// Listen for custom event from Demo button when already on home page
- window.addEventListener('startTour', () => shepherd.start());
115
+ window.addEventListener('startTour', () => shepherd.start(), { signal: controller.signal });
116
}, 400);
117
118
0 commit comments