Skip to content

Commit

Permalink
Fix some blocks fallback rendering
Browse files Browse the repository at this point in the history
The query selector was wrong
  • Loading branch information
mleray authored and comzeradd committed Oct 26, 2023
1 parent 1c58a06 commit e10eaab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/src/blocks/Covers/CoversScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {BLOCK_NAME} from './CoversConstants';
hydrateBlock(BLOCK_NAME, CoversFrontend);

// Fallback for non migrated content. Remove after migration.
document.querySelectorAll(BLOCK_NAME).forEach(
document.querySelectorAll(`[data-render=${BLOCK_NAME}]`).forEach(
blockNode => {
const attributes = JSON.parse(blockNode.dataset.attributes);
const rootElement = createRoot(blockNode);
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/ENForm/ENFormScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {hydrateBlock} from '../../functions/hydrateBlock';
hydrateBlock('planet4-blocks/enform', ENFormFrontend);

// Fallback for non migrated content. Remove after migration.
document.querySelectorAll('planet4-blocks/enform').forEach(
document.querySelectorAll('[data-render="planet4-blocks/enform"]').forEach(
blockNode => {
const attributes = JSON.parse(blockNode.dataset.attributes);
const rootElement = createRoot(blockNode);
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/Timeline/TimelineScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {hydrateBlock} from '../../functions/hydrateBlock';
hydrateBlock('planet4-blocks/timeline', TimelineFrontend);

// Fallback for non migrated content. Remove after migration.
document.querySelectorAll('planet4-blocks/timeline').forEach(
document.querySelectorAll('[data-render="planet4-blocks/timeline"]').forEach(
blockNode => {
const attributes = JSON.parse(blockNode.dataset.attributes);
const rootElement = createRoot(blockNode);
Expand Down

0 comments on commit e10eaab

Please sign in to comment.