Skip to content

Commit a8cf613

Browse files
avant1Kirill Krolik
authored and
Kirill Krolik
committed
fix error on first annotation page open
At first `checkpoint` localstorage entry does not exist, so `checkpoint` variable ends up to be `null`.
1 parent d4b7c89 commit a8cf613

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)