Skip to content

Commit

Permalink
Fix saving location components in map.js (#2099)
Browse files Browse the repository at this point in the history
  • Loading branch information
f107 committed Nov 5, 2021
1 parent 495b942 commit 9352d72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/scripts/map.js
Expand Up @@ -398,13 +398,13 @@ function getInfoToStore(name, lat, lng, city, state, country, postal){

var boycott = $("#boycott_"+name).val();
// 2 - city; 3 - state; 4 - country; 5 - postal
if (boycott.indexOf("2")!=-1)
if (boycott.indexOf("2")===-1)
city = '';
if (boycott.indexOf("3")!=-1)
if (boycott.indexOf("3")===-1)
state = '';
if (boycott.indexOf("4")!=-1)
if (boycott.indexOf("4")===-1)
country = '';
if (boycott.indexOf("5")!=-1)
if (boycott.indexOf("5")===-1)
postal = '';

$("#answer"+name).val(lat + ';' + lng + ';' + city + ';' + state + ';' + country + ';' + postal);
Expand Down

0 comments on commit 9352d72

Please sign in to comment.