Skip to content

Instantly share code, notes, and snippets.

@olopsman
Last active June 22, 2020 11:29
Show Gist options
  • Save olopsman/40083de309c5bd890a85ded655c342f2 to your computer and use it in GitHub Desktop.
Save olopsman/40083de309c5bd890a85ded655c342f2 to your computer and use it in GitHub Desktop.
p.then($A.getCallback(function(response) {
//do something
console.log('success response ' + response);
return 'success';
}).then(function(message){
if(message == 'success'){
// do something
console.log('message: ' + message);
}
}).catch(function(error){
//do something
console.log('error:' , error);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment