aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-18 18:03:48 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-18 18:03:48 -0700
commitad6b0ccf530519671d6af4843a5a6e5ac7f119e2 (patch)
tree5a2599c10fd5af33a1712d32d5a08b045d7b182d /web/app
parentfa3ecdcd8f181c01279a0712dc795f7f2cf909ee (diff)
downloadtrackermap-web-ad6b0ccf530519671d6af4843a5a6e5ac7f119e2.tar.gz
trackermap-web-ad6b0ccf530519671d6af4843a5a6e5ac7f119e2.tar.bz2
trackermap-web-ad6b0ccf530519671d6af4843a5a6e5ac7f119e2.zip
Fix report error handling
Diffstat (limited to 'web/app')
-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) {