Skip to content

Commit 0b64267

Browse files
Fix existing session bug (#187)
On starting a new session and clearing data, hasExistingSession didn't update. It then appears as though you have a session to resume when you might not.
1 parent d373dd9 commit 0b64267

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pages/Homepage.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
const playgroundSurveyUrl =
4242
'https://stage.microbit.org/teach/playground-survey/exploring-machine-learning';
4343
44-
const hasExistingSession = gestures
45-
.getGestures()
46-
.some(g => g.getName() || g.getRecordings().length);
44+
$: hasExistingSession = $gestures.some(g => g.name || g.recordings.length);
4745
let showDataLossWarning = false;
4846
4947
const checkForExistingSession = () => {

0 commit comments

Comments
 (0)