Skip to content

Commit

Permalink
fix; potential undefined country code for bing
Browse files Browse the repository at this point in the history
  • Loading branch information
wavded committed Mar 25, 2014
1 parent ac28f0f commit 7e741da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wheredat.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

var G = {
geocode: function (address, country, city) {
if (!isMapQuest) jsonp('?countryCode='+country+'&q='+address)
if (!isMapQuest) jsonp('?countryCode='+(country || 'US')+'&q='+address)
else {
if (!country || !city) MQ.geocode().search(address).on('success', function(e) { window._wheredat_res(e.result.best) })
else MQ.geocode().search({ country: country, address: address, city: city }).on('success', function (e) { window._wheredat_res(e.result.best) })
Expand Down

0 comments on commit 7e741da

Please sign in to comment.