Skip to content

fix(map) :: ignore map coordinates that are not a pair of numbers - #1368

Merged
lovasoa merged 1 commit into
sqlpage:mainfrom
81reap:stack/3-map-coords
Aug 10, 2026
Merged

fix(map) :: ignore map coordinates that are not a pair of numbers#1368
lovasoa merged 1 commit into
sqlpage:mainfrom
81reap:stack/3-map-coords

Conversation

@81reap

@81reap 81reap commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • parseCoords returns whatever Number.parseFloat gives it, so "48.8" becomes [48.8] and "north" becomes [NaN].
  • Leaflet rejects such a value, and the exception stops the map being built, so one bad row hides every other marker.

Description

  • parseCoords returns undefined unless it parsed exactly two finite numbers.
  • createMarker returns undefined for a marker it cannot place, and the caller skips it.
  • Add tests/end-to-end/map-component.spec.ts, covering a well-formed centre and marker, a centre and a marker with no longitude, and a centre that is not numeric at all.
  • Add a changelog entry.

Testing

  • The browser suite passes 26 tests, five of them new.
  • The new tests assert that the other markers still appear when one is dropped.
  • npm test checks 37 files and reports nothing.
  • no console errors on card page fails for the reason described in fix(biome.js) :: fix remaining lint issues #1366, on this branch and on the unmodified base alike.

GitHub cannot base a pull request on a branch that lives in a fork, so all eight target main and each one carries the commits of those above it. Review and merge them in order:

  1. fix(biome.js) :: fix remaining lint issues #1366 :: fix(biome.js) :: fix remaining lint issues
  2. fix(modal) :: give modal component an accessible name #1367 :: fix(modal) :: give modal component an accessible name
  3. fix(map) :: ignore map coordinates that are not a pair of numbers #1368 :: fix(map) :: ignore map coordinates that are not a pair of numbers ← this PR
  4. feat(chart) :: render column charts as bar charts #1369 :: feat(chart) :: render column charts as bar charts
  5. fix(chart) :: align stacked series on their X values #1370 :: fix(chart) :: align stacked series on their X values
  6. fix(chart) :: line series up on a category axis for every chart type #1371 :: fix(chart) :: line series up on a category axis for every chart type
  7. fix(npm) :: install dependencies only once at root level #1372 :: fix(npm) :: install dependencies only once at root level
  8. feat(typescript) :: typecheck browser JavaScript in CI #1373 :: feat(typescript) :: typecheck browser JavaScript in CI

@lovasoa lovasoa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just ignoring instead of throwing makes the issue harder to debug for the developer, doesn't it? I'd be okay with logging an error to the console instead of blocking all rendering, but I'd rather not silently swallow errors

@81reap

81reap commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

that's a fair call out. I will make the changes and push up a fix once I get home from work

@81reap
81reap force-pushed the stack/3-map-coords branch from 3aeeb46 to 9115594 Compare August 10, 2026 18:57
@81reap

81reap commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

turns out i had my laptop on me. pushed up a fix during my lunch break

@81reap
81reap requested a review from lovasoa August 10, 2026 19:13
@lovasoa
lovasoa merged commit 98fc68a into sqlpage:main Aug 10, 2026
51 checks passed
@81reap
81reap deleted the stack/3-map-coords branch August 10, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants