Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid needless hasOwnProperty check in deepFreeze.
The "own" in getOwnPropertyNames ensures that all the names would pass the hasOwnProperty test. #3300 (comment) Regarding this comment by @jamesreggio, I would much rather patch apollo-utilities than revert the use of Object.create(null), since empty prototype-free objects never accidentally appear to have properties inherited from Object.prototype (a correctness concern), and lookups of missing properties are faster since there's no prototype chain. Far from being deficient, Object.create(null) objects are what empty objects should always have been in JavaScript.
- Loading branch information