Skip to content

Commit

Permalink
fix: crash when starting with a pre 4.xx settings.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Oct 10, 2020
1 parent 8af445e commit 35b7732
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions server/reducers/settingsReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,18 @@ export const settings = (
nextState[0] = action.settings

// ignore UI state:
nextState[0].showSettings = state[0].showSettings
nextState[0].showOptions = state[0].showOptions
nextState[0].showMonitorOptions = state[0].showMonitorOptions
nextState[0].showStorage = state[0].showStorage
nextState[0].showChanStrip = state[0].showChanStrip
nextState[0].serverOnline = state[0].serverOnline
nextState[0].showSettings = state[0].showSettings || false
nextState[0].showOptions = state[0].showOptions || false
nextState[0].showMonitorOptions = state[0].showMonitorOptions || -1
nextState[0].showStorage = state[0].showStorage || false
nextState[0].showChanStrip = state[0].showChanStrip || -1
nextState[0].serverOnline = state[0].serverOnline || false
nextState[0].currentPage = state[0].currentPage
nextState[0].customPages = state[0].customPages

if (!nextState[0].mixers) {
nextState = [Object.assign({}, defaultSettingsReducerState[0])]
}
if (
typeof MixerProtocolPresets[
nextState[0].mixers[0].mixerProtocol
Expand Down

0 comments on commit 35b7732

Please sign in to comment.