Created
August 15, 2020 10:12
-
-
Save housecricket/b8259bcda8ed1ca537d313577a1baec0 to your computer and use it in GitHub Desktop.
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
// ✗ avoid | |
if (obj.prop) { .. } | |
if (obj.prop !== undefined) { ... } | |
// ✓ ok | |
if (Object.prototype.hasOwnProperty.call(obj, 'prop')) { ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment