Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Nov 7, 2024
2 parents 2500fd9 + ae7f8f1 commit 81da786
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/store/printer/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ export const getters: GetterTree<PrinterState, RootState> = {
let singleChannelTarget = null
const colorData = object.state.color_data ?? []

if ('color_order' in object.settings) colorOrder = object.settings.color_order[0] ?? ''
if ('color_order' in object.settings) {
if (typeof object.settings.color_order === 'string') {
colorOrder = object.settings.color_order
} else if (Array.isArray(object.settings.color_order) && object.settings.color_order.length > 0) {
colorOrder = object.settings.color_order[0]
}
}

if (object.type === 'led') {
colorOrder = ''
Expand Down

0 comments on commit 81da786

Please sign in to comment.