Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.

Commit 1a11c5a

Browse files
authored
fix: programmatic openPopup can end up with dead tiles (#843)
1 parent c6dd7d4 commit 1a11c5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/controllers/main-utilities.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ export function mergeTileDefaults (tile) {
6868
mergeTileListDefaults(mergedTile.layout.tiles);
6969
}
7070
break;
71-
case TYPES.POPUP:
72-
if (mergedTile.popup?.items) {
73-
mergeTileListDefaults(mergedTile.popup.items);
74-
}
75-
break;
71+
}
72+
// "popup" property is only officially supported in POPUP types but in the wild it can be added to any
73+
// tile and then passed programmatically when calling "openPopup".
74+
if (mergedTile.popup?.items) {
75+
mergeTileListDefaults(mergedTile.popup.items);
7676
}
7777
mergedTile[MERGED_DEFAULTS_KEY] = true;
7878
return mergedTile;

0 commit comments

Comments
 (0)