From 49c97e2cf279b41bb6429ef3dfe818c40bff68c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 2 Jan 2018 10:56:45 +0100 Subject: [PATCH] Use default argument --- lib/cartodb/controllers/named_maps.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/cartodb/controllers/named_maps.js b/lib/cartodb/controllers/named_maps.js index b878890d..03008261 100644 --- a/lib/cartodb/controllers/named_maps.js +++ b/lib/cartodb/controllers/named_maps.js @@ -271,19 +271,18 @@ function getImageOptionsFromTemplate (template, zoom) { } } -function getImageOptionsFromBoundingBox (bbox) { - if (bbox) { - var _bbox = bbox.split(',').map(numMapper); - if (_bbox.length === 4 && _bbox.every(Number.isFinite)) { - return { - bounds: { - west: _bbox[0], - south: _bbox[1], - east: _bbox[2], - north: _bbox[3] - } - }; - } +function getImageOptionsFromBoundingBox (bbox = '') { + var _bbox = bbox.split(',').map(numMapper); + + if (_bbox.length === 4 && _bbox.every(Number.isFinite)) { + return { + bounds: { + west: _bbox[0], + south: _bbox[1], + east: _bbox[2], + north: _bbox[3] + } + }; } }