duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Is It Snowing - Ensure value exists for location #392

Closed moollaza closed 10 years ago

moollaza commented 10 years ago

When we use the Location API to infer the users location, we simply join the values assuming they have a value, which causes a broken search.

https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Snow.pm#L40

image

If the city or region is defined, we should just bail and not make a useless request.

jagtalon commented 10 years ago

Fixed by #408