Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1.  
  2. case 'maybe':
  3.  
  4. //tuk ima question, no nqma answer
  5. console.log(MessageHistoryService.history[MessageHistoryService.history.length - 1])
  6.  
  7. if(MessageHistoryService.history[MessageHistoryService.history.length - 1].answer && MessageHistoryService.history[MessageHistoryService.history.length - 1].answer.text=== choice.option){
  8. console.log("it's the same don't show it")
  9. }else {
  10. console.log('inside else',MessageHistoryService.history[MessageHistoryService.history.length - 1])
  11. MessageHistoryService.addMessage(new MessageHistoryFactory('answer', 'text', choice.option));
  12. console.log('inside else_-> after added',MessageHistoryService.history[MessageHistoryService.history.length - 1])
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement