Skip to content

Commit 3e45be1

Browse files
committed
fix: fix the ts version selected by the user
1 parent 47da477 commit 3e45be1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/store.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export function useStore(
266266
}
267267
}
268268
if (vueVersion.value) files._version = vueVersion.value
269+
if (typescriptVersion.value) files._tsVersion = typescriptVersion.value
269270
return '#' + utoa(JSON.stringify(files))
270271
}
271272
const deserialize: ReplStore['deserialize'] = (serializedState: string) => {
@@ -282,7 +283,10 @@ export function useStore(
282283
for (const filename in saved) {
283284
if (filename === '_version') {
284285
vueVersion.value = saved[filename]
285-
} else {
286+
} else if (filename === '_tsVersion') {
287+
typescriptVersion.value = saved[filename]
288+
}
289+
else {
286290
setFile(files.value, filename, saved[filename])
287291
}
288292
}

0 commit comments

Comments
 (0)