From d7a5e57a222c05b3c7a8b058efa9591ab572b1bb Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 8 Dec 2017 00:05:52 +0100 Subject: [PATCH] fix: view.websocket (object length fixes '/emergency' notification count) --- view/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/websocket.js b/view/websocket.js index f79e96b..634d1af 100644 --- a/view/websocket.js +++ b/view/websocket.js @@ -35,7 +35,7 @@ window.wsc_emergency = wsc.channel('emergency/31').listen(function(msg, err){ // {3} Add notification count if not already on page // if( router.app.$route.path != '/emergency' ) - gstore.data.notif.emergency.count += msg.add.length; + gstore.data.notif.emergency.count += Object.keys(msg.add).length; }