Created
June 21, 2017 17:56
-
-
Save MgenGlder/3f5bbfc3a2200f19f24b01a0be084de8 to your computer and use it in GitHub Desktop.
Check if an attribute belongs to an object before accessing it.
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
(key in inventoryRecord.custom) && inventoryRecord.custom[key] >= qtySelected; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment