Comparing version 5.2.1 to 5.2.2
@@ -266,6 +266,6 @@ var tilelive = exports; | ||
// constraints if multiple keys are present. | ||
if ('minzoom' in info && 'maxzoom' in info && info.minzoom > info.maxzoom) | ||
if ((typeof info.minzoom === 'number') && (typeof info.maxzoom === 'number') && info.minzoom > info.maxzoom) | ||
return new Error('minzoom must be less than or equal to maxzoom'); | ||
if ('center' in info && 'bounds' in info) { | ||
if (Array.isArray(info.center) && Array.isArray(info.bounds)) { | ||
if (info.center[0] < info.bounds[0] || info.center[0] > info.bounds[2]) | ||
@@ -277,5 +277,5 @@ return new Error('center lon value must be between bounds ' + info.bounds[0] + ' and ' + info.bounds[2]); | ||
if ('center' in info && 'minzoom' in info && info.center[2] < info.minzoom) | ||
if (Array.isArray(info.center) && (typeof info.minzoom === 'number') && info.center[2] < info.minzoom) | ||
return new Error('center zoom value must be greater than or equal to minzoom ' + info.minzoom); | ||
if ('center' in info && 'maxzoom' in info && info.center[2] > info.maxzoom) | ||
if (Array.isArray(info.center) && (typeof info.maxzoom === 'number') && info.center[2] > info.maxzoom) | ||
return new Error('center zoom value must be less than or equal to maxzoom ' + info.maxzoom); | ||
@@ -282,0 +282,0 @@ }; |
{ | ||
"name": "tilelive", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"main": "./lib/tilelive.js", | ||
@@ -5,0 +5,0 @@ "description": "API for various map tile backends", |
53496