Commit cafc68e
committed
Addressing copilot comment
Copilot spotted that ?browserPreview=true made the cache locale bypass apply too broadly.
This change scopes that bypass to embedded browser previews by passing the existing embedded
prop into useProject. Non-embedded routes with ?browserPreview=true now still require the
cached locale to match, while embedded preview tabs can still load unsaved localized changes.
Added tests for both cases.1 parent cf42ffa commit cafc68e
3 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
143 | 168 | | |
144 | 169 | | |
145 | 170 | | |
| |||
559 | 584 | | |
560 | 585 | | |
561 | 586 | | |
| 587 | + | |
562 | 588 | | |
563 | 589 | | |
564 | 590 | | |
| |||
581 | 607 | | |
582 | 608 | | |
583 | 609 | | |
584 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
585 | 615 | | |
586 | 616 | | |
587 | 617 | | |
| |||
591 | 621 | | |
592 | 622 | | |
593 | 623 | | |
| 624 | + | |
594 | 625 | | |
595 | 626 | | |
596 | 627 | | |
| |||
0 commit comments