Skip to content

Commit bed4f26

Browse files
authored
fix: prevent iframe from reloading when a folder is clicked (sveltejs#245)
1 parent cc3548a commit bed4f26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/tutorial/[slug]/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { derived, writable } from 'svelte/store';
22

33
/**
44
* @typedef {{
5-
* status: 'initial' | 'select' | 'set' | 'update' | 'switch';
5+
* status: 'initial' | 'select' | 'set' | 'update' | 'switch' | 'expand';
66
* stubs: import("$lib/types").Stub[];
77
* last_updated?: import("$lib/types").FileStub;
88
* selected: string | null;
@@ -141,6 +141,7 @@ export const state = {
141141
toggle_expanded: (name, expanded) => {
142142
update((state) => ({
143143
...state,
144+
status: 'expand',
144145
expanded: {
145146
...state.expanded,
146147
[name]: expanded ?? !state.expanded[name]

0 commit comments

Comments
 (0)