Skip to content

Commit

Permalink
fix(snippet): use session to store data
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Apr 29, 2023
1 parent 0af9ed4 commit b21275d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/views/snippets/tabs/for-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const Tab2ForEdit = defineComponent({
const data = useStorage<SnippetModel>(
editId.value ? `snippet-${editId.value}` : 'snippet',
new SnippetModel(),

editId.value ? localStorage : sessionStorage,
)

const typeToValueMap = reactive<Record<SnippetType, string>>(
Expand Down

0 comments on commit b21275d

Please sign in to comment.