Skip to content

fix: fix the ts version selected by the user #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ export function useStore(
}
}
if (vueVersion.value) files._version = vueVersion.value
if (typescriptVersion.value !== 'latest' || files._tsVersion) {
files._tsVersion = typescriptVersion.value
}
return '#' + utoa(JSON.stringify(files))
}
const deserialize: ReplStore['deserialize'] = (
Expand All @@ -289,6 +292,8 @@ export function useStore(
for (const filename in saved) {
if (filename === '_version') {
vueVersion.value = saved[filename]
} else if (filename === '_tsVersion') {
typescriptVersion.value = saved[filename]
} else {
setFile(files.value, filename, saved[filename])
}
Expand Down