Skip to content

Commit

Permalink
Found one more glitch in fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
lupestro committed Sep 2, 2024
1 parent 99775bd commit cffdbb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ export default class SourceLibrary {
if (sources[source].consumable === "false") {
sources[source].consumable = false;
}
// Normalize lights to be an array, not a single object
if (
sources[source].light &&
sources[source].light.constructor !== Array
sources[source].light.constructor.name !== "Array"
) {
sources[source].light = [sources[source].light];
}
// If states isn't specified, derive it by counting the lights and adding one for "off" state.
if (
sources[source].light &&
sources[source].light.constructor.name === "Array" &&
Expand Down

0 comments on commit cffdbb6

Please sign in to comment.