Fix for when input is not an array. This will be handled differently in an upcoming code change.

This commit is contained in:
Joshi 2020-02-28 09:47:58 -08:00
parent 2609a41ee8
commit c9419d3e2d

View File

@ -79,6 +79,8 @@ export default class TelemetryCriterion extends EventEmitter {
params.push(data[this.metadata]); params.push(data[this.metadata]);
if (this.input instanceof Array && this.input.length) { if (this.input instanceof Array && this.input.length) {
params.push(this.input[0]); params.push(this.input[0]);
} else {
params.push(this.input);
} }
if (typeof comparator === 'function') { if (typeof comparator === 'function') {
result = comparator(params); result = comparator(params);