From 360a80b795a7b1bcb57c439b184c3e064e44c91f Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Fri, 20 Jan 2017 15:45:02 +0100 Subject: [PATCH] Append websocket items only if proper mode is set --- socialdragon/assets/js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/socialdragon/assets/js/app.js b/socialdragon/assets/js/app.js index 98d7ad4..4a94c4e 100644 --- a/socialdragon/assets/js/app.js +++ b/socialdragon/assets/js/app.js @@ -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); + } }