Skip to content

Commit

Permalink
fix: lat/lng removed from compressed loo meaning filter access index …
Browse files Browse the repository at this point in the history
…was off
  • Loading branch information
ob6160 committed Jan 9, 2022
1 parent 47b0498 commit 958e3b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/loo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ export const parseCompressedLoo = (
compressedLoo: CompressedLooString
): CompressedLooObject => {
const loo = compressedLoo.split('|');
const { latitude, longitude } = ngeohash.decode(loo[1]);
const [looId, geohash, filterBitmask] = loo;
const { latitude, longitude } = ngeohash.decode(geohash);
return {
id: loo[0],
id: looId,
location: {
lng: longitude,
lat: latitude,
},
filterBitmask: parseInt(loo[3], 10),
filterBitmask: parseInt(filterBitmask, 10),
};
};

Expand Down

0 comments on commit 958e3b9

Please sign in to comment.