Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using Object.isFrozen to prevent dev/prod differences.
If you revert the previous commit and run `npm test`, you'll see all the tests this dynamic Object.isFrozen check has been silently protecting from failing, but only (and this is the important part) in development. Since we only actually freeze objects with Object.freeze in development, this Object.isFrozen check does not help in production, so an object that would have been frozen in development gets reused as a mutable copy, potentially acquiring properties it should not acquire (a bug fixed by the previous commit, first reported in issue #9735).
- Loading branch information