Skip to content

Commit

Permalink
Interactivity API: Remove redundant server state from Interactivity R…
Browse files Browse the repository at this point in the history
…outer

Remove the workaround for a bug that was fixed in WordPress/gutenberg#66183. Previously, if the store was not initialized with a minimal navigation object, the interactivity-router script module would error.

Props jonsurrell, czapla, gziolo.
Fixes 62465#.


git-svn-id: https://develop.svn.wordpress.org/trunk@59416 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
michalczaplinski committed Nov 18, 2024
1 parent 61b9859 commit 0365bff
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/wp-includes/interactivity-api/class-wp-interactivity-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1090,19 +1090,6 @@ private function data_wp_router_region_processor( WP_Interactivity_API_Directive
if ( 'enter' === $mode && ! $this->has_processed_router_region ) {
$this->has_processed_router_region = true;

/*
* Initialize the `core/router` store.
* If the store is not initialized like this with minimal
* navigation object, the interactivity-router script module
* errors.
*/
$this->state(
'core/router',
array(
'navigation' => new stdClass(),
)
);

// Enqueues as an inline style.
wp_register_style( 'wp-interactivity-router-animations', false );
wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() );
Expand Down

0 comments on commit 0365bff

Please sign in to comment.