Skip to content

Commit

Permalink
fix: save version only when serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 10, 2024
1 parent 9fd15ba commit d3ee13d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export function useStore(
delete files[importMapFile]
}
}
if (vueVersion.value) files._version = vueVersion.value
return '#' + utoa(JSON.stringify(files))
}
const deserialize: ReplStore['deserialize'] = (serializedState: string) => {
Expand All @@ -275,7 +276,6 @@ export function useStore(
const normalized = stripSrcPrefix(filename)
exported[normalized] = file.code
}
if (vueVersion.value) exported._version = vueVersion.value
return exported
}
const setFiles: ReplStore['setFiles'] = async (
Expand Down

0 comments on commit d3ee13d

Please sign in to comment.