Check if persistedState exists beforetrying to use it (fix #214)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user