We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c81dae commit 0129532Copy full SHA for 0129532
pages/api/offers.js
@@ -31,8 +31,8 @@ export default (req, res) => {
31
const citiesKeys = Object.keys(citiesCoords);
32
citiesKeys.forEach((cityName) => {
33
const cityCoords = citiesCoords[cityName];
34
- const hasMatchingLat = latitude >= cityCoords.lat - 3 && latitude <= cityCoords.lat + 3;
35
- const hasMatchingLon = longitude >= cityCoords.lon - 3 && longitude <= cityCoords.lon + 3;
+ const hasMatchingLat = latitude >= cityCoords.lat - 3 || latitude <= cityCoords.lat + 3;
+ const hasMatchingLon = longitude >= cityCoords.lon - 3 || longitude <= cityCoords.lon + 3;
36
if(hasMatchingLat && hasMatchingLon) {
37
city = cityName;
38
}
0 commit comments