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.
Built from https://develop.svn.wordpress.org/branches/6.7@59436


git-svn-id: http://core.svn.wordpress.org/branches/6.7@58822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
desrosj committed Nov 20, 2024
1 parent 13d7e96 commit 3b56f5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions 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
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7.1-alpha-59435';
$wp_version = '6.7.1-alpha-59436';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 3b56f5b

Please sign in to comment.