Skip to content

Commit 070eb12

Browse files
committed
DBC22-6157: attempt to fix applyOverlapOffsets crash in mobile
1 parent 9ce921d commit 070eb12

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/frontend/src/Components/map/helpers/spatial.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ export const applyOverlapOffsets = (overlapGroups, mapView) => {
261261
const resolution = mapView.current.getResolution();
262262
const projection = mapView.current.getProjection().getCode();
263263

264+
// Map not visible, return
265+
if (resolution <= 0) {
266+
return;
267+
}
268+
264269
for (const [, entries] of Object.entries(overlapGroups)) {
265270
for (let i = 0; i < entries.length; i++) {
266271
// Resets every feature to its original position first, then offsets

0 commit comments

Comments
 (0)