From 62de4a4901cc58d1d235e0344b22f34185135be8 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Thu, 18 Apr 2013 12:51:37 -0400 Subject: [PATCH] Remove hard-coded isNumber, use underscore --- panels/map2/module.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/panels/map2/module.js b/panels/map2/module.js index 607fcd4335c..e494004ac39 100644 --- a/panels/map2/module.js +++ b/panels/map2/module.js @@ -64,10 +64,6 @@ angular.module('kibana.map2', []) }; - $scope.isNumber = function (n) { - return !isNaN(parseFloat(n)) && isFinite(n); - }; - $scope.get_data = function () { // Make sure we have everything for the request to complete @@ -128,8 +124,7 @@ angular.module('kibana.map2', []) _.each(results.facets.map.terms, function (v) { - //FIX THIS - if (!$scope.isNumber(v.term)) { + if (!_.isNumber(v.term)) { $scope.data[v.term.toUpperCase()] = v[metric]; } else { $scope.data[v.term] = v[metric];