bugfix: Correct reference to websocket room name

When inside the onmessage function, `this` no longer refers to the
websocket node. It needs to be accessed with `that`, which is where we
stored it previously.
This commit is contained in:
amfl
2020-01-14 14:29:23 +13:00
parent 469e3d964c
commit 40e09fe294

View File

@@ -86,7 +86,7 @@
this._ws.onmessage = function(e) {
that.boxcolor = "#AFA";
var data = JSON.parse(e.data);
if (data.room && data.room != this.properties.room) {
if (data.room && data.room != that.properties.room) {
return;
}
if (e.data.type == 1) {