From 19cfe6dd53e59e299a193f3853e85f0e2f7f6f05 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Thu, 19 Oct 2017 15:25:30 +0300 Subject: [PATCH] Fix bounds check, bounds are different is one of the argument is undefined --- src/util/googleMaps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/googleMaps.js b/src/util/googleMaps.js index a2c0682f..535e2835 100644 --- a/src/util/googleMaps.js +++ b/src/util/googleMaps.js @@ -146,7 +146,7 @@ export const sdkBoundsToFixedCoordinates = (sdkBounds, fixedPrecision) => { * @return {boolean} - true if bounds are the same */ export const hasSameSDKBounds = (sdkBounds1, sdkBounds2) => { - if (!(sdkBounds1 instanceof SDKLatLngBounds) && !(sdkBounds2 instanceof SDKLatLngBounds)) { + if (!(sdkBounds1 instanceof SDKLatLngBounds) || !(sdkBounds2 instanceof SDKLatLngBounds)) { return false; } return (