fix: put back if

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
Andrew Calcutt 2024-01-29 01:16:03 -05:00
parent 55abcd0061
commit 3752416600

View file

@ -381,6 +381,14 @@ const respondImage = (
overlay = null, overlay = null,
mode = 'tile', mode = 'tile',
) => { ) => {
if (
Math.abs(lon) > 180 ||
Math.abs(lat) > 85.06 ||
lon !== lon ||
lat !== lat
) {
return res.status(400).send('Invalid center');
}
if ( if (
Math.min(width, height) <= 0 || Math.min(width, height) <= 0 ||