Fix bounds check, bounds are different is one of the argument is undefined

This commit is contained in:
Vesa Luusua 2017-10-19 15:25:30 +03:00
parent 8ce2e536e8
commit 19cfe6dd53

View file

@ -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 (