Skip to content

fix(web-pkg): guard against missing routes in getEditorRoute#1975

Open
dschmidt wants to merge 1 commit intoopencloud-eu:next-release/stable-4.2from
dschmidt:fix/file-extension-route-resolve-crash
Open

fix(web-pkg): guard against missing routes in getEditorRoute#1975
dschmidt wants to merge 1 commit intoopencloud-eu:next-release/stable-4.2from
dschmidt:fix/file-extension-route-resolve-crash

Conversation

@dschmidt
Copy link
Contributor

Description

Apps can register file extensions without defining routes (e.g. for icon association only). After the vue-router v5 upgrade, router.resolve() throws on non-existent route names instead of failing silently. This caused a crash when listing folders containing files handled by such apps.

Check router.hasRoute() before calling router.resolve() to prevent the error.

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

Apps can register file extensions without defining routes (e.g. for
icon association only). After the vue-router v5 upgrade, router.resolve()
throws on non-existent route names instead of failing silently. This
caused a crash when listing folders containing files handled by such apps.

Check router.hasRoute() before calling router.resolve() to prevent the
error.
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