Skip to content

Commit

Permalink
Merge pull request #3062 from balena-io/init-leds-map
Browse files Browse the repository at this point in the history
Initialize leds object map
  • Loading branch information
zvin authored Feb 5, 2020
2 parents f8b46dc + fdec65e commit 8771f31
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/gui/app/models/leds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ export function init() {
// ],
// ...
// }
const ledsMapping: _.Dictionary<[string, string, string]> = settings.get(
'ledsMapping',
);
const ledsMapping: _.Dictionary<[string, string, string]> =
settings.get('ledsMapping') || {};
for (const [drivePath, ledsPaths] of Object.entries(ledsMapping)) {
leds.set('/dev/disk/by-path/' + drivePath, new RGBLed(ledsPaths));
}
Expand Down

0 comments on commit 8771f31

Please sign in to comment.