Skip to content

Commit f0de656

Browse files
authored
Merge pull request doccano#473 from avant1/fix-first-annotation-page-open
Fix error on first annotation page open
2 parents d4b7c89 + a8cf613 commit f0de656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/store/pagination.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const mutations = {
2929
localStorage.setItem('checkpoint', JSON.stringify(checkpoint))
3030
},
3131
loadPage(state) {
32-
const checkpoint = JSON.parse(localStorage.getItem('checkpoint'))
32+
const checkpoint = JSON.parse(localStorage.getItem('checkpoint')) || {}
3333
state.page = checkpoint[state.projectId] ? checkpoint[state.projectId] : 1
3434
},
3535
setProjectId(state, projectId) {

0 commit comments

Comments
 (0)