diff options
Diffstat (limited to 'web/app/view/AttributesController.js')
-rw-r--r-- | web/app/view/AttributesController.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/app/view/AttributesController.js b/web/app/view/AttributesController.js index 2a9e71849..8e6ab82a4 100644 --- a/web/app/view/AttributesController.js +++ b/web/app/view/AttributesController.js @@ -38,6 +38,7 @@ Ext.define('Traccar.view.AttributesController', { } } store.addListener('add', function (store, records, index, eOpts) { + var i; for (i = 0; i < records.length; i++) { this.getView().record.get('attributes')[records[i].get('name')] = records[i].get('value'); } @@ -53,7 +54,8 @@ Ext.define('Traccar.view.AttributesController', { } }, this); store.addListener('remove', function (store, records, index, isMove, eOpts) { - for (var i = 0; i < records.length; i++) { + var i; + for (i = 0; i < records.length; i++) { delete this.getView().record.get('attributes')[records[i].get('name')]; } this.getView().record.dirty = true; |