Commit 449f49d
committed
fix(app): correct data migration logic in demo mode
Ensures that the `DemoDataInitializerService` is not called when a data migration from an anonymous to an authenticated user is in progress.
Previously, when an anonymous user linked their account, the `DemoDataInitializerService` would create fresh fixture data for the new authenticated user ID. Immediately after, the `DemoDataMigrationService` would run, but its migrated data was being overwritten or made redundant by the initialization step.
This change makes the initialization and migration paths mutually exclusive. The `DemoDataInitializerService` will now only run for a new user if it is not a migration scenario, fixing the regression and ensuring that an anonymous user's data is correctly preserved upon account linking.1 parent 8dd8d04 commit 449f49d
1 file changed
+15
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
344 | 348 | | |
345 | 349 | | |
346 | 350 | | |
| |||
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
379 | | - | |
380 | | - | |
381 | | - | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
| |||
0 commit comments