From 3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 18 Aug 2017 11:22:48 +1200 Subject: Fix various style issues --- web/app/controller/Root.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'web/app/controller/Root.js') diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index baba68a1..92620115 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -52,6 +52,7 @@ Ext.define('Traccar.controller.Root', { if (value !== undefined) { return Traccar.AttributeFormatter.getAttributeConverter(this.attributeKey)(value); } + return null; }, onLaunch: function () { @@ -162,7 +163,7 @@ Ext.define('Traccar.controller.Root', { pathname = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1); socket = new WebSocket(protocol + '//' + window.location.host + pathname + 'api/socket'); - socket.onclose = function (event) { + socket.onclose = function () { Traccar.app.showToast(Strings.errorSocket, Strings.errorTitle); Ext.Ajax.request({ @@ -291,7 +292,10 @@ Ext.define('Traccar.controller.Root', { if (success) { for (i = 0; i < records.length; i++) { value = records[i].get('type'); - store.add({type: value, name: Traccar.app.getEventString(value)}); + store.add({ + type: value, + name: Traccar.app.getEventString(value) + }); } } } -- cgit v1.2.3