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:
@@ -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({
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user