Skip to content

Commit 0244a16

Browse files
committed
Fixed issue with reset button where all locations were duplicated - introduced in v3.0.1
1 parent 81e4936 commit 0244a16

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v3.1.10 - 2023-05-17
1+
/*! jQuery Google Maps Store Locator - v3.1.10 - 2023-05-21
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2023 Bjorn Holine; Licensed MIT */
44

@@ -2897,14 +2897,15 @@
28972897

28982898
// Set a variable for fullMapStart so we can detect the first run
28992899
if (
2900-
( _this.settings.fullMapStart === true && openMap === false ) ||
2901-
( _this.settings.autoGeocode === true && openMap === false ) ||
2902-
( _this.settings.defaultLoc === true && openMap === false ) ||
2903-
reload === true
2900+
(_this.settings.fullMapStart === true && openMap === false) ||
2901+
(_this.settings.autoGeocode === true && openMap === false) ||
2902+
(_this.settings.defaultLoc === true && openMap === false)
29042903
) {
29052904
firstRun = true;
2906-
}
2907-
else {
2905+
} else if (reload === true) {
2906+
_this.reset();
2907+
firstRun = true;
2908+
} else {
29082909
_this.reset();
29092910
}
29102911

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/jquery.storelocator.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2893,14 +2893,15 @@
28932893

28942894
// Set a variable for fullMapStart so we can detect the first run
28952895
if (
2896-
( _this.settings.fullMapStart === true && openMap === false ) ||
2897-
( _this.settings.autoGeocode === true && openMap === false ) ||
2898-
( _this.settings.defaultLoc === true && openMap === false ) ||
2899-
reload === true
2896+
(_this.settings.fullMapStart === true && openMap === false) ||
2897+
(_this.settings.autoGeocode === true && openMap === false) ||
2898+
(_this.settings.defaultLoc === true && openMap === false)
29002899
) {
29012900
firstRun = true;
2902-
}
2903-
else {
2901+
} else if (reload === true) {
2902+
_this.reset();
2903+
firstRun = true;
2904+
} else {
29042905
_this.reset();
29052906
}
29062907

0 commit comments

Comments
 (0)