Skip to content

Commit 1c56308

Browse files
authored
Update src/geo/lng_lat_bounds.js
1 parent 639ccfd commit 1c56308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/geo/lng_lat_bounds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class LngLatBounds {
215215
* @returns {boolean} True if the point is within the bounding box.
216216
*/
217217
contains(lnglat: LngLatLike) {
218-
lnglat = lnglat instanceof LngLat ? new LngLat(lnglat.lng, lnglat.lat) : LngLat.convert(lnglat);
218+
lnglat = LngLat.convert(lnglat);
219219

220220
const containsLatitude = this._sw.lat <= lnglat.lat && lnglat.lat <= this._ne.lat;
221221
let containsLongitude = this._sw.lng <= lnglat.lng && lnglat.lng <= this._ne.lng;

0 commit comments

Comments
 (0)