Skip to content

Commit

Permalink
fix: default label setting if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Sep 22, 2021
1 parent 035b7c9 commit eab45ac
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/utils/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ export function getFaderLabel(faderIndex: number, defaultName = 'CH'): string {
const channelLabel = getChannelLabel(state, faderIndex)

switch (state.settings[0].labelType) {
case 'automation':
return automationLabel || defaultName + ' ' + (faderIndex + 1)
case 'user':
return userLabel || defaultName + ' ' + (faderIndex + 1)
case 'channel':
return channelLabel || defaultName + ' ' + (faderIndex + 1)
case 'automatic':
default:
return (
userLabel ||
automationLabel ||
channelLabel ||
defaultName + ' ' + (faderIndex + 1)
)
case 'automation':
return automationLabel || defaultName + ' ' + (faderIndex + 1)
case 'user':
return userLabel || defaultName + ' ' + (faderIndex + 1)
case 'channel':
return channelLabel || defaultName + ' ' + (faderIndex + 1)
}
}

0 comments on commit eab45ac

Please sign in to comment.