emberjs / emberjs/router.js

transitionTo and handleURL fail silently if `triggerEvent` is not provided.

Open
#333 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

If you create a new Router() instance and do not create a `triggerEvent` function on it (eg. `router.triggerEvent = function(){};` ) then when you try to use the router via `transitionTo` or `handleURL` your route handler functions will not be called, the hidden optional logging function provided as a constructor argument doesnt log any errors, nor does the javascript engine itself. Only the returned Intent object shows a `this.triggerEvent is not a function` error without any additional information.

Doing a global text search through the entire codebase for "triggerEvent" only returns a function definition in `router.d.ts` which implies that the function should be implemented inside the `router.es.js` module but it isnt.

Also reading through the entire README yields no mention of `triggerEvent` or anything to point towards an issue here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.