From 2a04d9a51b953d989c318cd446df26e530b6ba9b Mon Sep 17 00:00:00 2001 From: elenatorro Date: Fri, 8 Nov 2019 18:40:03 +0100 Subject: [PATCH] Fix isNumber --- src/renderer/viz/expressions/belongs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/renderer/viz/expressions/belongs.js b/src/renderer/viz/expressions/belongs.js index 937ed52f2..b9d295b3a 100644 --- a/src/renderer/viz/expressions/belongs.js +++ b/src/renderer/viz/expressions/belongs.js @@ -1,6 +1,5 @@ import { implicitCast, checkType, checkExpression, checkMaxArguments } from './utils'; import BaseExpression from './base'; -import * as util from 'util'; /** * Check if a categorical value belongs to a list of categories. @@ -121,7 +120,7 @@ function generateBelongsExpression (name, inlineMaker, jsEval) { _getFuncList () { return (elem) => { - const x = util.isNumber(elem) ? `${elem}.0` : `cat${elem._uid}`; + const x = this.input.type === 'number' ? `${elem}.0` : `cat${elem._uid}`; return `if (x${this.compare}${x}) { return 1.; }`; }; }