Commit f766535
committed
Guard popup import flow against invalid backups and read errors
Importing data in the popup assumed file reads, JSON parsing, and
storage writes would always succeed, leaving failures unhandled and
giving users no feedback.
Catch errors across the import flow and validate that parsed backup data
is a plain object before writing it to storage, so invalid files fail
clearly without changing the successful restore path.1 parent 5a59aa0 commit f766535
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
578 | 587 | | |
579 | 588 | | |
580 | 589 | | |
| |||
0 commit comments