Skip to content

Commit

Permalink
fix empty feature in addLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
SnezhanaAbramova committed Aug 15, 2022
1 parent a0a119f commit 54dc4b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/components/layers/odata-vector-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ export default BaseVectorLayer.extend({
leafletObject = this.get('_leafletObject');
}

if (!layer) {
// явная ошибка, не должно быть такой ситуации
return leafletObject;
}

if (layer.state && layer.state !== state.insert) {
L.FeatureGroup.prototype.addLayer.call(leafletObject, layer);
return;
Expand Down

0 comments on commit 54dc4b7

Please sign in to comment.