fix(fe): read capture-session store directly (no $ prefix on the object)

`createCaptureSession()` returns {state: Store, ...}; Svelte's $ prefix
calls .subscribe on the object, not the store, so $captureSession.state
threw 'subscribe is not a function' on App mount → black page. Reference the
store directly (auto-subscribes): captureSession.state / session.state /
session.lineup(). Verified: tsc clean, build green, 150/150 tests, and the
live app renders in Chromium.
This commit is contained in:
2026-09-25 07:04:55 -07:00
parent e09901b701
commit 88a2518cfa
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -98,7 +98,7 @@
const current = $slab;
try {
if (!current) {
const s = $captureSession.state;
const s = captureSession.state;
const results = s.capture.k === 'measure' ? s.capture.results : null;
const d = results
? draft({
+2 -2
View File
@@ -7,8 +7,8 @@
export let session: CaptureSession;
const dispatch = createEventDispatcher<{ continue: void }>();
$: state = $session.state;
$: items = $session.lineup();
$: state = session.state;
$: items = session.lineup();
$: measure = state.capture.k === 'measure' ? state.capture : null;
$: results = measure?.results ?? null;
+1 -1
View File
@@ -6,7 +6,7 @@
export let session: CaptureSession;
const dispatch = createEventDispatcher<{ 'photos-ready': void }>();
$: state = $session.state;
$: state = session.state;
$: cap = state.capture;
$: kind = cap.k;