From fe7b8bd58e23e289a041bc7c9a5d6c37f085419a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Jul 2016 13:26:33 +1200 Subject: Fix issues in JavaScript code --- web/app/controller/Root.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'web/app/controller') diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index ba23b90bf..98ded9c47 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -139,27 +139,27 @@ Ext.define('Traccar.controller.Root', { store.add(array[i]); if (array[i].type === 'commandResult' && data.positions) { for (j = 0; j < data.positions.length; j++) { - if (data.positions[j].id == array[i].positionId) { + if (data.positions[j].id === array[i].positionId) { text = data.positions[j].attributes.result; break; } } - text = Strings.eventCommandResult + ": " + text; + text = Strings.eventCommandResult + ': ' + text; } else { typeKey = 'event' + array[i].type.charAt(0).toUpperCase() + array[i].type.slice(1); text = Strings[typeKey]; - if (typeof text == "undefined") { + if (typeof text === 'undefined') { text = typeKey; } } if (array[i].geofenceId !== 0) { geofence = Ext.getStore('Geofences').getById(array[i].geofenceId); - if (typeof geofence != "undefined") { + if (typeof geofence !== 'undefined') { text += ' \"' + geofence.getData().name + '"'; } } device = Ext.getStore('Devices').getById(array[i].deviceId); - if (typeof device != "undefined") { + if (typeof device !== 'undefined') { Ext.toast(text, device.getData().name); } } -- cgit v1.2.3