Skip to content

Commit de393a7

Browse files
committed
Interactivity API: Remove redundant server state from Interactivity Router.
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
1 parent f570701 commit de393a7

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/wp-includes/interactivity-api/class-wp-interactivity-api.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,19 +1090,6 @@ private function data_wp_router_region_processor( WP_Interactivity_API_Directive
10901090
if ( 'enter' === $mode && ! $this->has_processed_router_region ) {
10911091
$this->has_processed_router_region = true;
10921092

1093-
/*
1094-
* Initialize the `core/router` store.
1095-
* If the store is not initialized like this with minimal
1096-
* navigation object, the interactivity-router script module
1097-
* errors.
1098-
*/
1099-
$this->state(
1100-
'core/router',
1101-
array(
1102-
'navigation' => new stdClass(),
1103-
)
1104-
);
1105-
11061093
// Enqueues as an inline style.
11071094
wp_register_style( 'wp-interactivity-router-animations', false );
11081095
wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() );

0 commit comments

Comments
 (0)