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.

Reviewed by desrosj.
Merges [59416] to the 6.7 branch.

Props jonsurrell, czapla, gziolo.
Fixes #62465.

git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59436 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Nov 20, 2024
1 parent f570701 commit de393a7
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 de393a7

Please sign in to comment.