mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
quick hack to prevent mbg records from crashing pebble
Process would crash because mbg records would error when formatting sgv to string.
This commit is contained in:
@@ -49,6 +49,7 @@ function pebble (req, res) {
|
||||
}
|
||||
if (element) {
|
||||
var obj = {};
|
||||
if (!element.sgv) return;
|
||||
obj.sgv = scaleBg(element.sgv).toString( );
|
||||
obj.bgdelta = (next ? (scaleBg(element.sgv) - scaleBg(next.sgv) ) : 0);
|
||||
if (useMetricBg) {
|
||||
|
||||
Reference in New Issue
Block a user