fix problem when there is only one variable requested. Default that having index 0 in the renderData array

This commit is contained in:
Stuart Lynn 2015-09-09 10:48:53 -04:00
parent e9bde54840
commit 73e2a3736c

View File

@ -121,8 +121,9 @@ var Profiler = require('../profiler');
var dates = row.dates__uint16;
var val_keys = Object.keys(row).filter(function(k){return (k.indexOf("vals__uint8") > -1) })
var val_arr = []
val_keys.forEach(function(key){
var i = key.match(/vals__uint8_(\d+)/)[1]
var i = (key=='vals_uint8' ? 0 : key.match(/vals__uint8_(\d+)/)[1])
val_arr[i] = row[key];
})