Fix saving list view if not present in browser

This commit is contained in:
kolaente 2020-05-29 16:33:57 +02:00
parent fe8f0ecd67
commit 32984b88a3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
export const saveListView = (listId, routeName) => {
const savedListViewJson = JSON.parse(localStorage.getItem('listView'))
const savedListView = localStorage.getItem('listView')
let savedListViewJson = false
if (savedListView !== null) {
savedListViewJson = JSON.parse(savedListView)
}
let listView = {}
if(savedListViewJson) {