1👍
✅
The answer I found was to be that I was using fat arrow functions and so I wasn’t binding this
.
All I changed was:
sockets: {
chatMessage: function(data){
//-> returns what I needed
}
}
Source:stackexchange.com