Check if persistedState exists beforetrying to use it (fix #214)

This commit is contained in:
Deluan 2020-04-25 13:37:02 -04:00
parent 47311d16cf
commit 531155d016
1 changed files with 3 additions and 1 deletions

View File

@ -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,