Skip to content
Permalink
Browse files

don't forget to check the length

  • Loading branch information...
jasoncalabrese committed Dec 11, 2016
1 parent 103fce0 commit 4d1aadc2c98957cb1668bdc942ea91bf935e372a
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/plugins/bgnow.js
@@ -194,7 +194,7 @@ function init (ctx) {

var deviceInfos = { };

if (prop.sgvs) {
if (prop.sgvs && prop.sgvs.length > 1) {
_.forEach(prop.sgvs, function deviceAndValue(entry) {
var device = deviceName(entry.device);
deviceInfos[device] = {
@@ -205,7 +205,7 @@ function init (ctx) {
});
}

if (delta.previous && delta.previous.sgvs) {
if (delta.previous && delta.previous.sgvs && delta.previous.sgvs.length > 1) {
_.forEach(delta.previous.sgvs, function deviceAndValue(entry) {
var device = deviceName(entry.device);
var deviceInfo = deviceInfos[device];

0 comments on commit 4d1aadc

Please sign in to comment.
You can’t perform that action at this time.