Check if persistedState exists beforetrying to use it (fix #214)
This commit is contained in:
parent
47311d16cf
commit
531155d016
|
@ -37,7 +37,9 @@ export default ({
|
|||
|
||||
const persistedState = loadState()
|
||||
// TODO Better encapsulate state in general
|
||||
persistedState.queue.playing = false
|
||||
if (persistedState && persistedState.queue) {
|
||||
persistedState.queue.playing = false
|
||||
}
|
||||
const store = createStore(
|
||||
resettableAppReducer,
|
||||
persistedState,
|
||||
|
|
Loading…
Reference in New Issue