emberjs / emberjs/ember.js

Controller availability in buildRouteInfoMetadata

Open
#18,615 0 comments 0 reactions 1 assignee Claimed by @chadhietala View on GitHub
Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

I spotted an error in our Sentry logs where `this.controller` is not available in `buildRouteInfoMetadata`

We use the hook to gather information about what is on the controller, and then use a Service to monitor route will/did change events, and send the `routeInfo.metadata` to a third party).

If I cannot guarantee that the controller is available in `buildRouteInfoMetadata`, then this pattern will not work any more.

Can the behaviour around this hook be clarified a bit more? (It isn't very well documented)

Screenshot 2019-12-16 at 09 54 23

Screenshot 2019-12-16 at 10 00 14

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.