Skip to content

Commit

Permalink
fix: 🐛 playground template for defined containerSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
mjancarik committed Sep 13, 2024
1 parent 3c6c40c commit 60427ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/templates/body.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if(widgetProperties?.slot?.headline?.html){ %>
<div class="<%= (widgetProperties?.slot?.title?.containerSelector ?? 'headline-view').replace('.', '') %>">
<div class="<%= (widgetProperties?.slot?.headline?.containerSelector ?? 'headline-view').replace('.', '') %>">
<%- widgetProperties?.slot?.headline?.html %>
</div>
<% } %>
Expand All @@ -9,7 +9,7 @@
__merkur__.create(<%- escapeToJSON(widgetProperties) %>)
.then(function (widget) {
widget.containerSelector = '.merkur-view';
if (widget?.slot?.headline) {
if (widget?.slot?.headline && !widget?.slot?.headline?.containerSelector) {
widget.slot.headline.containerSelector = '.headline-view';
}
Expand Down

0 comments on commit 60427ac

Please sign in to comment.