Skip to content

Commit 1aa8ef4

Browse files
committed
fix(src): Fix arguments in getAddress
1 parent 6811a89 commit 1aa8ef4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ const getFromCache = (lat, lng) => {
4242

4343
const getAddress = loc => {
4444
return new Promise((resolve, reject) => {
45-
getCoordinates(loc).then(({lng, lat}) => {
45+
getCoordinates(loc).then(data => {
46+
const lng = data.lng;
47+
const lat = data.lat;
4648
if (client) {
4749
getFromCache(lat, lng).then(reply => {
4850
if (reply) resolve(reply);

0 commit comments

Comments
 (0)