mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
deviceInfo.recent null check (#3048)
This commit is contained in:
committed by
Sulka Haro
parent
2f67610577
commit
d0f94d9a75
@@ -209,7 +209,7 @@ function init (ctx) {
|
||||
_.forEach(delta.previous.sgvs, function deviceAndValue(entry) {
|
||||
var device = utils.deviceName(entry.device);
|
||||
var deviceInfo = deviceInfos[device];
|
||||
if (deviceInfo) {
|
||||
if (deviceInfo && deviceInfo.recent) {
|
||||
var deviceDelta = bgnow.calcDelta(
|
||||
{ mills: deviceInfo.recent.mills , mean: deviceInfo.recent.mgdl}
|
||||
, { mills: entry.mills, mean: entry.mgdl}
|
||||
|
||||
Reference in New Issue
Block a user