mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Use _.parseInt
This commit is contained in:
parent
299e373882
commit
734068e67a
1 changed files with 4 additions and 2 deletions
|
@ -6,14 +6,16 @@ define(function (require) {
|
|||
var defaultPrecision = 3;
|
||||
|
||||
function getPrecision(precision) {
|
||||
var maxPrecision = _.parseInt(config.get('visualization:tileMap:maxPrecision'));
|
||||
|
||||
precision = parseInt(precision, 10);
|
||||
|
||||
if (isNaN(precision)) {
|
||||
precision = defaultPrecision;
|
||||
}
|
||||
|
||||
if (precision > config.get('visualization:tileMap:maxPrecision')) {
|
||||
return parseInt(config.get('visualization:tileMap:maxPrecision'), 10);
|
||||
if (precision > maxPrecision) {
|
||||
return maxPrecision;
|
||||
}
|
||||
|
||||
return precision;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue