aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-09 13:26:33 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-07-09 13:26:33 +1200
commitfe7b8bd58e23e289a041bc7c9a5d6c37f085419a (patch)
treed28b58d1ea3b4fcd6c715c4f2d2e2e04cb91c208 /web/app/controller
parent70d22de4205aec294660378f0d854cbc32c7a6b8 (diff)
downloadtraccar-server-fe7b8bd58e23e289a041bc7c9a5d6c37f085419a.tar.gz
traccar-server-fe7b8bd58e23e289a041bc7c9a5d6c37f085419a.tar.bz2
traccar-server-fe7b8bd58e23e289a041bc7c9a5d6c37f085419a.zip
Fix issues in JavaScript code
Diffstat (limited to 'web/app/controller')
-rw-r--r--web/app/controller/Root.js10
1 files changed, 5 insertions, 5 deletions
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);
}
}