Skip to content

Commit e92fc1b

Browse files
committed
stricter handling of bounding box null
1 parent 3457d0f commit e92fc1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web-app/src/app/components/CoveredAreaMap.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
197197
const displayGtfsVisualizationView =
198198
view === 'gtfsVisualizationView' && feed?.data_type === 'gtfs';
199199

200-
if (displayBoundingBoxMap) {
201-
return <Map polygon={boundingBox ?? []} />;
200+
if (displayBoundingBoxMap && boundingBox != undefined) {
201+
return <Map polygon={boundingBox} />;
202202
}
203203

204-
if (displayGtfsVisualizationView) {
204+
if (displayGtfsVisualizationView && boundingBox != undefined) {
205205
return (
206206
<>
207207
<Fab
@@ -213,7 +213,7 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
213213
<ZoomOutMapIcon></ZoomOutMapIcon>
214214
</Fab>
215215
<GtfsVisualizationMap
216-
polygon={boundingBox ?? []}
216+
polygon={boundingBox}
217217
latestDataset={latestDataset}
218218
dataDisplayLimit={config.visualizationMapPreviewDataLimit}
219219
preview={true}

0 commit comments

Comments
 (0)