Skip to content

Commit

Permalink
fix: Unbreak custom names/icons for mode values
Browse files Browse the repository at this point in the history
Fixes #235
  • Loading branch information
nervetattoo committed Apr 8, 2021
1 parent 5b72034 commit 2d1b98a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ function getModeList(
return attributes[`${type}_modes`]
.filter((modeOption) => shouldShowModeControl(modeOption, specification))
.map((modeOption) => {
const values = typeof specification[modeOption] === 'object' ? specification[modeOption] : {} as {}
return {
icon: MODE_ICONS[modeOption],
value: modeOption,
name: modeOption,
...values,
}
})
}
Expand Down

0 comments on commit 2d1b98a

Please sign in to comment.