aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/view/ReportController.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 4241df35..8f63bd31 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -290,10 +290,12 @@ Ext.define('Traccar.view.ReportController', {
loadRelatedPositions: function (store, data) {
var i, reportObject, positionIds = [];
Ext.getStore('ReportRoute').removeAll();
- for (i = 0; i < data.length; i++) {
- reportObject = data[i];
- if (reportObject.get('positionId')) {
- positionIds.push(reportObject.get('positionId'));
+ if (data) {
+ for (i = 0; i < data.length; i++) {
+ reportObject = data[i];
+ if (reportObject.get('positionId')) {
+ positionIds.push(reportObject.get('positionId'));
+ }
}
}
if (positionIds.length > 0) {