Interactivity API - Random directive parsing errors v19.5.0 #66490
Labels
[Feature] Interactivity API
API to add frontend interactivity to blocks.
[Type] Bug
An existing feature does not function as intended
Description
After updating to Gutenberg 19.5.0 from 19.4.0 I get errors when elements with directives get parsed.
The errors disappear when I downgrade back to 19.4.0
I get errors like:
directives.tsx:574 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map')
for elements that have the data-wp-each-child attribute
and the error:
directives.tsx:480 Uncaught TypeError: Cannot use 'in' operator to search for 'hidden' in null
for elements that have the data-wp-bind--hidden attribute set
What changed for this to happen?
Step-by-step reproduction instructions
Created a custom block with a render.php where these directives are used.
The viewScriptModule file view.js uses the following assets.php
<?php return array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'e60eae253fd57d3f', 'type' => 'module');
on page load I now get these errors why I didn't with 19.4.0
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: