mapbox / mapbox/mapbox-gl-js

extend method does not accept LngLatLike or LngLatBoundsLike obj

Open
#9,787 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/mapbox/mapbox-gl-js/blob/8516027f933dc68cf14bae834cdb9fc3e91f68b0/src/geo/lng_lat_bounds.js#L69

extend method is described to accept LngLatLike or LngLatBoundsLike types, but implementation accepts only "instanceof LngLat", "instanceof LngLatBounds" and "isArray(obj)".

Other object-like arguments are just skipped.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/geo/lng_lat_bounds.js at the linked line and inspect how extend distinguishes LngLatLike and LngLatBoundsLike inputs. Confirm which object-like forms are currently skipped, then verify that supported forms are extended consistently and that the relevant geo tests cover the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.