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

Commit

Permalink
fix: programmatic openPopup can end up with dead tiles (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Jun 30, 2022
1 parent c6dd7d4 commit 1a11c5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/controllers/main-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export function mergeTileDefaults (tile) {
mergeTileListDefaults(mergedTile.layout.tiles);
}
break;
case TYPES.POPUP:
if (mergedTile.popup?.items) {
mergeTileListDefaults(mergedTile.popup.items);
}
break;
}
// "popup" property is only officially supported in POPUP types but in the wild it can be added to any
// tile and then passed programmatically when calling "openPopup".
if (mergedTile.popup?.items) {
mergeTileListDefaults(mergedTile.popup.items);
}
mergedTile[MERGED_DEFAULTS_KEY] = true;
return mergedTile;
Expand Down

0 comments on commit 1a11c5a

Please sign in to comment.