Skip to content

Commit

Permalink
MWPW-162760 [MEP] Issues with inline fragments (#3415)
Browse files Browse the repository at this point in the history
initial push
  • Loading branch information
vgoodric authored Jan 7, 2025
1 parent b063e5d commit 82694a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions libs/blocks/fragment/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ export default async function init(a) {
}

const fragment = createTag('div', { class: 'fragment', 'data-path': relHref });

if (!inline) {
fragment.append(...sections);
}
fragment.append(...sections);

updateFragMap(fragment, a, relHref);
if (a.dataset.manifestId
Expand Down
2 changes: 1 addition & 1 deletion libs/features/personalization/personalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ export function handleCommands(
const section1 = document.querySelector('main > div');
commands.forEach((cmd) => {
const { action, content, selector } = cmd;
cmd.content = forceInline ? addHash(content, INLINE_HASH) : content;
cmd.content = forceInline && getSelectorType(content) === 'fragment' ? addHash(content, INLINE_HASH) : content;
if (selector.startsWith(IN_BLOCK_SELECTOR_PREFIX)) {
registerInBlockActions(cmd);
cmd.selectorType = IN_BLOCK_SELECTOR_PREFIX;
Expand Down

0 comments on commit 82694a3

Please sign in to comment.