From e1c9f869ceab927649e46ae5da9662e0acb7c5cf Mon Sep 17 00:00:00 2001 From: Igor Dykhta Date: Wed, 29 Jan 2025 22:29:35 +0200 Subject: [PATCH] [fix] FSQ Storage provider temp fix (#2960) - FSQ Storage provider temp fix for `Error while fetching maps: Cannot read properties of undefined (reading 'map')` Signed-off-by: Ihor Dykhta --- .../src/cloud-providers/foursquare/foursquare-provider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo-app/src/cloud-providers/foursquare/foursquare-provider.js b/examples/demo-app/src/cloud-providers/foursquare/foursquare-provider.js index 1493b9e69f..04c48f2d93 100644 --- a/examples/demo-app/src/cloud-providers/foursquare/foursquare-provider.js +++ b/examples/demo-app/src/cloud-providers/foursquare/foursquare-provider.js @@ -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) {