Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug - we no longer get location_id back with location data

  • Loading branch information...
commit 549d557042b92b0e33f64e3d59ca3640b8deacff 1 parent 8878fe9
Dave Rolsky autarch authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 share/js-source/VegGuide/LocationSearch.js
6 share/js-source/VegGuide/LocationSearch.js
View
@@ -26,13 +26,15 @@ VegGuide.LocationSearch._populateLocationList = function ( res, div ) {
for ( var i = 0; i < locations.length; i++ ) {
var loc = locations[i];
+ var matches = loc.uri.match( /\/(\d+)$/ );
+ var location_id = matches[1];
var radio = document.createElement("input");
radio.type = "radio";
radio.name = "location_id";
- radio.value = loc.location_id;
- radio.id = "location_id-" + loc.location_id;
+ radio.value = location_id;
+ radio.id = "location_id-" + location_id;
radio.className = "radio";
var label = document.createElement("label");
Please sign in to comment.
Something went wrong with that request. Please try again.