mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-09-12 13:48:31 +00:00
fix(career): stage restore survives a setViz throw; size-register row
CodeRabbit on #956: a setViz failure nulled the restore snapshot AFTER the overrides were written, permanently borrowing the stage — snapshot now captured before any write, write failures keep it intact. Also registers career screen.js in docs/size-exemptions.md 'Planned, not exempt' (1,516 lines; max-lines WARNS non-blocking — the split plan needs Byron's sign-off). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
82edbb7266
commit
f0298abda1
@@ -1116,17 +1116,21 @@
|
|||||||
// the set ending gives it back (unlike "Play here", which is an
|
// the set ending gives it back (unlike "Play here", which is an
|
||||||
// explicit persistent choice on the venue card).
|
// explicit persistent choice on the venue card).
|
||||||
let restore = null;
|
let restore = null;
|
||||||
try {
|
if (prop.venue_id) {
|
||||||
if (prop.venue_id) {
|
// Capture the restore snapshot BEFORE any write: if a later write
|
||||||
|
// (or setViz) throws, the stage must still be returnable.
|
||||||
|
try {
|
||||||
restore = {
|
restore = {
|
||||||
venue: localStorage.getItem(VENUE_OVERRIDE_KEY),
|
venue: localStorage.getItem(VENUE_OVERRIDE_KEY),
|
||||||
viz: localStorage.getItem('vizSelection'),
|
viz: localStorage.getItem('vizSelection'),
|
||||||
};
|
};
|
||||||
|
} catch (_) { restore = null; }
|
||||||
|
try {
|
||||||
localStorage.setItem(VENUE_OVERRIDE_KEY, prop.venue_id);
|
localStorage.setItem(VENUE_OVERRIDE_KEY, prop.venue_id);
|
||||||
localStorage.setItem('vizSelection', 'venue');
|
localStorage.setItem('vizSelection', 'venue');
|
||||||
if (typeof window.setViz === 'function') window.setViz('venue');
|
if (typeof window.setViz === 'function') window.setViz('venue');
|
||||||
}
|
} catch (_) { /* viz optional — restore stays intact */ }
|
||||||
} catch (_) { restore = null; /* viz optional */ }
|
}
|
||||||
_appliedManifestVenue = null;
|
_appliedManifestVenue = null;
|
||||||
_ppGigRun = {
|
_ppGigRun = {
|
||||||
songs: prop.songs,
|
songs: prop.songs,
|
||||||
|
|||||||
Reference in New Issue
Block a user