Skip to content

Commit

Permalink
[fix] FSQ Storage provider temp fix (#2960)
Browse files Browse the repository at this point in the history
- FSQ Storage provider temp fix for
`Error while fetching maps: Cannot read properties of undefined (reading 'map')`

Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta authored Jan 29, 2025
1 parent 098ee9b commit e1c9f86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class FoursquareProvider extends Provider {
}
);
const data = await response.json();
return data.items.map(map => convertFSQModelToMapItem(map, `${this.apiURL}/v1/maps`));
return (data?.items || []).map(map => convertFSQModelToMapItem(map, `${this.apiURL}/v1/maps`));
}

async downloadMap(loadParams) {
Expand Down

0 comments on commit e1c9f86

Please sign in to comment.