Skip to content

Hotfix: patch a bug in STAC Browser that crash from undefined catch-all route param#182

Merged
tropicrainforest merged 2 commits into
mainfrom
stac-browser-router-gaurd
Jun 5, 2026
Merged

Hotfix: patch a bug in STAC Browser that crash from undefined catch-all route param#182
tropicrainforest merged 2 commits into
mainfrom
stac-browser-router-gaurd

Conversation

@tropicrainforest

Copy link
Copy Markdown
Contributor

The embedded STAC Browser crashes at runtime with TypeError: can't access property "startsWith", n is undefined. The error originates upstream in src/router/index.js: catchAllString() returns undefined when route.params.pathMatch is missing, and the catch-all route's props function then calls .startsWith() on that undefined value.
This is basically a bug on their side. The proper fix is a PR against STAC Browser, which we'll open upstream when we have time. For now, the low-hanging fruit is to carry a guard patch here and even if they fix this, this patch guard becomes harmless.

FYI @antarcticrainforest

@tropicrainforest tropicrainforest merged commit 77c298c into main Jun 5, 2026
6 checks passed
@tropicrainforest tropicrainforest deleted the stac-browser-router-gaurd branch June 5, 2026 09:33
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.

1 participant