Skip to content

Commit

Permalink
Make progress.chapter a string
Browse files Browse the repository at this point in the history
  • Loading branch information
ll3006 committed Jul 3, 2024
1 parent 4357529 commit 6fbd43d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stores/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const useProgressStore = defineStore("progressStore", () => {
const sources = useSourcesStore();

const title = ref("Unknown");
const chapter = ref(1);
const chapter = ref("1");
const page = ref(1);
const source = toRef(sources.currentSourceId);

Expand All @@ -18,8 +18,7 @@ export const useProgressStore = defineStore("progressStore", () => {
}

function setChapter(value: any) {
value = parseInt(value);
chapter.value = value ? value : 1;
chapter.value = value ? value : "1";
}

function setPage(value: any) {
Expand Down

0 comments on commit 6fbd43d

Please sign in to comment.