-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix internal issues caught by TS 4.9
TS 4.9 understands the `in` operator and catches two issues for us which earlier versions did not: 1. We were checking `name in model` in `Route#serialize` without checking that `model` there is an object. Given that a route's model is *not* guaranteed to be an object, this was a runtime error waiting to happen. `'a' in 2` will produce `TypeError: 2 is not an Object.' 2. We were checking for `Symbol.iterator in Array` in an internal `iterate()` utility in the `@ember/debug/data-adapter` package. This check is *always* true when targeting ES6 or newer, making the `else` branch a no-op on all currently-supported browsers.
- Loading branch information
1 parent
5551dde
commit dda3ffc
Showing
2 changed files
with
7 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters