Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ifCall = false;
  2. constructor(private rtc: WebrtcService, public api: ApiService, private toastr: ToastrService) {
  3. }
  4.  
  5. someFunction(){
  6. connection.checkPresence(x[0].roomId, function(isRoomEists, roomid) {
  7. if(isRoomEists) {
  8. connection.join(roomid);
  9. if(connection.getAllParticipants().length === 0){
  10. connection.getAllParticipants().forEach(function(participantId) {
  11. connection.disconnectWith(participantId);
  12. });
  13. // ERROR
  14. this.api.deleteRooms(roomid);
  15. }
  16. }
  17. else {
  18. // ERROR
  19. this.ifCall = false;
  20. this.api.deleteRooms(roomid);
  21.  
  22. }
  23. });
  24. }
  25. ``
  26.  
  27. core.js:15724 ERROR TypeError: Cannot set property 'ifCall' of undefined
  28. at home.component.ts:77
  29. at r.<anonymous> (rtc.min.js:18)
  30. at r.onack (socket.io.js:8)
  31. at r.onpacket (socket.io.js:8)
  32. at r.<anonymous> (socket.io.js:8)
  33. at r.emit (socket.io.js:6)
  34. at r.ondecoded (socket.io.js:6)
  35. at a.<anonymous> (socket.io.js:8)
  36. at a.r.emit (socket.io.js:6)
  37. at a.add (socket.io.js:6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement