Skip to content

Commit 20033a8

Browse files
committed
[fix] copy contents when editing file name
1 parent 258d063 commit 20033a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/routes/tutorial/[slug]/+page.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117
s.name.slice(to_rename.name.length);
118118
// deduplicate
119119
for (const to_add of add_stub(name, s.type, updated_stubs)) {
120+
if (s.type === 'file' && to_add.type === 'file') {
121+
to_add.contents = s.contents;
122+
}
120123
new_stubs.set(to_add.name, to_add);
121124
}
122125
}

0 commit comments

Comments
 (0)