Skip to content

fix(router): handle undefined catchAll param on root redirect#5955

Merged
hacdias merged 1 commit into
filebrowser:masterfrom
jolcese:master
May 21, 2026
Merged

fix(router): handle undefined catchAll param on root redirect#5955
hacdias merged 1 commit into
filebrowser:masterfrom
jolcese:master

Conversation

@jolcese
Copy link
Copy Markdown
Contributor

@jolcese jolcese commented May 20, 2026

When accessing '/', Vue Router sets 'to.params.catchAll' to undefined for the catch-all route '/:catchAll(.)'. The previous code used the spread operator '[...to.params.catchAll]' which threw:

TypeError: e.params.catchAll is not iterable

Fix by safely checking if catchAll is defined before spreading, and handling both array and string forms of the param. Falls back to '/files/' when catchAll is empty/undefined.

Description

Additional Information

Checklist

Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • I am aware the project is currently in maintenance-only mode and new feature requests won't be accepted. See README
  • I am aware that translations MUST be made through Transifex and that this PR is NOT a translation update
  • I am making a PR against the master branch.
  • I am sure File Browser can be successfully built. See builds and development.

When accessing '/', Vue Router sets 'to.params.catchAll' to undefined
for the catch-all route '/:catchAll(.*)*'. The previous code used the
spread operator '[...to.params.catchAll]' which threw:

  TypeError: e.params.catchAll is not iterable

Fix by safely checking if catchAll is defined before spreading, and
handling both array and string forms of the param. Falls back to
'/files/' when catchAll is empty/undefined.
@jolcese jolcese requested a review from a team as a code owner May 20, 2026 04:22
@hacdias hacdias merged commit 6ad8160 into filebrowser:master May 21, 2026
7 checks passed
helix-nine added a commit to Start9Labs/filebrowser-startos that referenced this pull request May 21, 2026
… → 2.63.5:0

Upstream patch release fixing router crash on undefined catchAll
param on root redirect (filebrowser/filebrowser#5955).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants