Skip to content

Commit

Permalink
fix: Crash, when switching to global settings
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSusa committed Aug 2, 2020
1 parent 057197c commit d5eb5bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/midi-bricks/src/pages/GlobalSettingsPageCmp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ function GlobalSettingsPageComponent(props) {
actions,
thunkChangePage,
pages = {},
midi: {
midiAccess: { inputs, outputs }
},
midi,
sliderList,
viewSettings: {
isSettingsDialogMode,
Expand All @@ -61,6 +59,8 @@ function GlobalSettingsPageComponent(props) {
if (isMidiFailed) return <div />
const hasPage = Object.values(pages).length > 0
const pagesArray = hasPage ? Object.values(pages) : []
const { midiAccess } = midi || {}
const { inputs = [], outputs = [] } = midiAccess || {}
return (hasPage ? pagesArray : ['OK']).map((page, idx) => {
//const { sliderList } = page
const label = (pageTargets[idx] && pageTargets[idx].label) || page.label
Expand Down

0 comments on commit d5eb5bf

Please sign in to comment.