@@ -52,8 +52,6 @@ let demoRouter: VueRouter;
52
52
// Simple state tracking for current modal
53
53
let currentModal : DemoFlowType = 'idle' ;
54
54
55
- // Track if demo has been initialized to prevent duplicate initialization
56
- let isInitialized = false ;
57
55
58
56
// Demo modal imports for dynamic loading
59
57
const DemoFallbackModal = ( ) =>
@@ -78,12 +76,6 @@ export function dangerouslyInitializeDemo(router: VueRouter): void {
78
76
return ;
79
77
}
80
78
81
- // Prevent duplicate initialization during hot reload
82
- if ( isInitialized && demoRouter === router ) {
83
- console . debug ( '[Demo] Demo already initialized, skipping duplicate initialization.' ) ;
84
- return ;
85
- }
86
-
87
79
console . warn ( '[Demo] Initializing demo environment...' ) ;
88
80
89
81
demoRouter = router ;
@@ -114,8 +106,6 @@ export function dangerouslyInitializeDemo(router: VueRouter): void {
114
106
// Send initial ready message to parent frame
115
107
sendInitialReadyMessage ( ) ;
116
108
117
- // Mark as initialized
118
- isInitialized = true ;
119
109
}
120
110
121
111
/**
@@ -148,12 +138,6 @@ function sendInitialReadyMessage(): void {
148
138
* Adds routes pointing to our demo modals.
149
139
*/
150
140
function addDemoModalRoutes ( ) : void {
151
- // Use a flag attached to the router instance to track if routes were added
152
- // This persists across hot reloads since the router instance persists
153
- if ( ( demoRouter as any ) . _demoRoutesAdded ) {
154
- console . debug ( '[Demo] Routes already added to router, skipping duplicate registration' ) ;
155
- return ;
156
- }
157
141
158
142
// Import layout components for explicit inclusion
159
143
const AccountOverview = ( ) => import ( /* webpackChunkName: "account-overview" */ '@/components/layouts/AccountOverview.vue' ) ;
@@ -184,8 +168,6 @@ function addDemoModalRoutes(): void {
184
168
meta : { column : Columns . DYNAMIC } ,
185
169
} ) ;
186
170
187
- // Mark routes as added on the router instance
188
- ( demoRouter as any ) . _demoRoutesAdded = true ;
189
171
console . debug ( '[Demo] Demo routes added successfully' ) ;
190
172
}
191
173
0 commit comments