Skip to content

Commit 55eff6e

Browse files
author
Dave Conway-Jones
committed
Reject obvious bad chart data
to close #713
1 parent 9305d1a commit 55eff6e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nodes/ui_chart.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ module.exports = function(RED) {
7272
return converted;
7373
}
7474
if (value[0].hasOwnProperty("series") && value[0].hasOwnProperty("data")) {
75+
if (!Array.isArray(value[0].series)) { node.error("series not array",msg); return; }
76+
if (!Array.isArray(value[0].data)) { node.error("Data not array",msg); return; }
7577
var flag = true;
7678
for (var dd = 0; dd < value[0].data.length; dd++ ) {
7779
if (!isNaN(value[0].data[dd][0])) { flag = false; }

0 commit comments

Comments
 (0)