Skip to content

Commit cd8211e

Browse files
Applied a fix in case on the elements where not defined in processForm. When running a .val() would return undefined so instead now sets to '' if undefined
1 parent 212a78e commit cd8211e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,21 +1231,21 @@
12311231
}
12321232
else{
12331233
// Get the user input and use it
1234-
addressInput = $addressInput.val();
1235-
searchInput = $searchInput.val();
1234+
addressInput = $addressInput.val() || '';
1235+
searchInput = $searchInput.val() || '';
12361236
// Get the distance if set
12371237
if (this.settings.maxDistance === true) {
1238-
distance = $distanceInput.val();
1238+
distance = $distanceInput.val() || '';
12391239
}
12401240
}
12411241
}
12421242
else {
12431243
// Get the user input and use it
1244-
addressInput = $addressInput.val();
1245-
searchInput = $searchInput.val();
1244+
addressInput = $addressInput.val() || '';
1245+
searchInput = $searchInput.val() || '';
12461246
// Get the distance if set
12471247
if (this.settings.maxDistance === true) {
1248-
distance = $distanceInput.val();
1248+
distance = $distanceInput.val() || '';
12491249
}
12501250
}
12511251

0 commit comments

Comments
 (0)