Commit 62de4a49 by Zachary Tong

Remove hard-coded isNumber, use underscore

parent 18276edd
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment