Skip to content

Commit

Permalink
Update grid cache defensively
Browse files Browse the repository at this point in the history
  • Loading branch information
d-mo committed Sep 7, 2018
1 parent 92c95ae commit 3d5faa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mist-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,10 @@ <h2>Download list data in CSV</h2>
console.debug('eventReceived', item, this.applyFilter(item.detail));
if (this.applyFilter(item.detail))
this.async(function () {
this.$.grid.unshift('_cache.0', item.detail);
this.$.grid.fire('iron-resize');
if (this.$.grid && this.$.grid.get('_cache.0') != undefined) {
this.$.grid.unshift('_cache.0', item.detail);
this.$.grid.fire('iron-resize');
}
});
},

Expand Down

0 comments on commit 3d5faa6

Please sign in to comment.