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