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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

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) {