From 9c64d674b3522f80c812f7676fb1c1aa4c3c5dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 14 Sep 2017 18:02:13 +0200 Subject: [PATCH] Do not use underscore --- lib/cartodb/models/dataview/formula.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/cartodb/models/dataview/formula.js b/lib/cartodb/models/dataview/formula.js index 4c7f185b..36b5369b 100644 --- a/lib/cartodb/models/dataview/formula.js +++ b/lib/cartodb/models/dataview/formula.js @@ -1,4 +1,3 @@ -var _ = require('underscore'); var BaseDataview = require('./base'); var debug = require('debug')('windshaft:dataview:formula'); @@ -51,7 +50,7 @@ var TYPE = 'formula'; } */ function Formula(query, options = {}, queries = {}) { - if (!_.isString(options.operation)) { + if (typeof options.operation !== 'string') { throw new Error('Formula expects `operation` in widget options'); } @@ -59,7 +58,7 @@ function Formula(query, options = {}, queries = {}) { throw new Error("Formula does not support '" + options.operation + "' operation"); } - if (options.operation !== 'count' && !_.isString(options.column)) { + if (options.operation !== 'count' && typeof options.column !== 'string') { throw new Error('Formula expects `column` in widget options'); }