Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'maybe':
- //tuk ima question, no nqma answer
- console.log(MessageHistoryService.history[MessageHistoryService.history.length - 1])
- if(MessageHistoryService.history[MessageHistoryService.history.length - 1].answer && MessageHistoryService.history[MessageHistoryService.history.length - 1].answer.text=== choice.option){
- console.log("it's the same don't show it")
- }else {
- console.log('inside else',MessageHistoryService.history[MessageHistoryService.history.length - 1])
- MessageHistoryService.addMessage(new MessageHistoryFactory('answer', 'text', choice.option));
- console.log('inside else_-> after added',MessageHistoryService.history[MessageHistoryService.history.length - 1])
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement