Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. self.getPotentialPersonDuplicates()
  2. .then(function (result) {
  3. return result.length > 0
  4. ? self.promptUserToPickFromDuplicatePersons(result)
  5. : Promise.reject(new Error("There where no duplicates found"));
  6. })
  7. .then(function (result) { return result ? self.selectPersonFromDuplicatePersonLookup() : Promise.resolve(); })
  8. .then(function (result) { return result ? self.addAsParticipant(redirect) : Promise.resolve(); })
  9. .catch(function (e) {
  10. console.log(e.stack);
  11. return self.createOdsPerson()
  12. .then(self.addAsParticipant.bind(self, redirect));
  13. })
  14. .then($ui.stopWaiting());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement