Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX stable] Allow
store
to be injected on Route
In the public types, TypeScript (correctly) complains when users try to inject the store with `@service store` on a `Route` subclass, because the item is an accessor on `Route` itself, and the service injection "happens" to work only because the `set store(value)` smashes itself as well as the corresponding `get store()` using `defineProperty`. Work around this by renaming the getter in question to `_store` and updating the one usage to check for a `store` property before falling back to the `_store` property. Happily, this also dovetails with the plan to deprecate the automatic `findModel` behavior this exists to support: once that is removed, this entire code path can be cleaned up trivially.
- Loading branch information