Skip to content

Commit

Permalink
Fixed Multiple times using error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehmet Aydemir committed May 8, 2017
1 parent 8a69cc5 commit 64f7db3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/leaflet-tag-filter-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
_filterInfo: null,
_selectedTags: [],
_invisibles: [],
layerSources: null,

// GLOBAL FUNCTIONS

Expand Down Expand Up @@ -140,12 +141,14 @@
this.layerSources.currentSource = this.layerSources.sources["pruneCluster"];
},

layerSources: {
_prepareLayerSources: function() {

currentSource: null,
this.layerSources = new Object();
this.layerSources["sources"] = new Object();

sources: {
default: {
this.registerCustomSource({
"name": "default",
"source": {
hide: function() {

var toBeRemovedFromInvisibles = [], i;
Expand Down Expand Up @@ -195,7 +198,8 @@
return totalCount - removedMarkers.length;
}
}
}
});
this.layerSources.currentSource = this.layerSources.sources["default"];
},

_showFilterInfo: function(filteredCount) {
Expand Down Expand Up @@ -361,7 +365,7 @@

initialize: function(options) {
L.Util.setOptions(this, options || {});
this.layerSources.currentSource = this.layerSources.sources["default"];
this._prepareLayerSources();
},

addTo: function(map) {
Expand Down

0 comments on commit 64f7db3

Please sign in to comment.