Skip to content

[Bug] Cannot read properties of undefined (reading 'shouldSupersede') #20051

Closed
@Turbo87

Description

@Turbo87

🐞 Describe the Bug

When calling routerService.urlFor(...) the call throws the following error:

TypeError: Cannot read properties of undefined (reading 'shouldSupersede')
    at NamedTransitionIntent.applyToHandlers (http://localhost:4040/assets/vendor.js:58167:52)
    at NamedTransitionIntent.applyToState (http://localhost:4040/assets/vendor.js:58109:19)
    at PrivateRouter.generate (http://localhost:4040/assets/vendor.js:59134:26)
    at Router.generate (http://localhost:4040/assets/vendor.js:18718:38)
    at RouterService.urlFor (http://localhost:4040/assets/vendor.js:15630:27)
    at CatchAllRoute.urlForRouteInfo (webpack://cargo/./node_modules/ember-error-route/index.js?:84:24)
    at CatchAllRoute.serialize (webpack://cargo/./node_modules/ember-error-route/index.js?:60:21)

🔬 Minimal Reproduction

😕 Actual Behavior

The error page does not work properly.

🤔 Expected Behavior

The call does not fail and the error route is displayed correctly.

🌍 Environment

  • Ember: 4.3.0 (works fine in 4.2.0)
  • Node.js/npm: irrelevant
  • OS: irrelevant
  • Browser: irrelevant

➕ Additional Context

This is most likely related to the changes that were introduced in #19971

/cc @wagenet

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions