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#.

Built from https://develop.svn.wordpress.org/trunk@59416


git-svn-id: https://core.svn.wordpress.org/trunk@58802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
michalczaplinski committed Nov 18, 2024
1 parent d61bb2c commit 2feb752
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.8-alpha-59415';
$wp_version = '6.8-alpha-59416';

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

0 comments on commit 2feb752

Please sign in to comment.