Skip to content

Instantly share code, notes, and snippets.

@captainkovalsky
Created June 4, 2015 13:37
Show Gist options
  • Save captainkovalsky/bb3af948dfd3e53ca710 to your computer and use it in GitHub Desktop.
Save captainkovalsky/bb3af948dfd3e53ca710 to your computer and use it in GitHub Desktop.
QbpJpb
if (usr.settings) {            
if (usr.settings.email) {              
if (usr.settings.email.followingpost) {
//do action
}
}
}
if (usr.settings && usr.settings.email && usr.settings.email.followingpost) {
//do action
}
var followingPost =_.get(usr, 'settings.email.followingpost');
if (followingPost) { //or _.has
//do action
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment