diff --git a/assets/src/blocks/Counter/CounterScript.js b/assets/src/blocks/Counter/CounterScript.js index 41d8da66df..43568f5015 100644 --- a/assets/src/blocks/Counter/CounterScript.js +++ b/assets/src/blocks/Counter/CounterScript.js @@ -1,12 +1,11 @@ import {CounterFrontend} from './CounterFrontend'; import {hydrateBlock} from '../../functions/hydrateBlock'; -import {BLOCK_NAME} from './CounterBlock'; import {createRoot} from 'react-dom/client'; -hydrateBlock(BLOCK_NAME, CounterFrontend); +hydrateBlock('planet4-blocks/counter', CounterFrontend); // Fallback for non migrated content. Remove after migration. -document.querySelectorAll(`[data-render="${BLOCK_NAME}"]`).forEach( +document.querySelectorAll('[data-render="planet4-blocks/counter"]').forEach( blockNode => { const attributes = JSON.parse(blockNode.dataset.attributes); const rootElement = createRoot(blockNode);