Append websocket items only if proper mode is set

This commit is contained in:
Marvin Scholz 2017-01-20 15:45:02 +01:00
parent 135a04db24
commit 360a80b795

View file

@ -55,5 +55,7 @@ exampleSocket.onopen = function (event) {
};
exampleSocket.onmessage = function (event) {
item = JSON.parse(event.data);
app.items.push(item);
if (item.State === state) {
app.items.push(item);
}
}