Interactivity API: Remove redundant server state from Interactivity Router
Remove the workaround for a bug that was fixed in https://github.com/WordPress/gutenberg/pull/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: http://core.svn.wordpress.org/trunk@58802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a7dda35133
commit
c0baa82edc
|
@ -1090,19 +1090,6 @@ HTML;
|
||||||
if ( 'enter' === $mode && ! $this->has_processed_router_region ) {
|
if ( 'enter' === $mode && ! $this->has_processed_router_region ) {
|
||||||
$this->has_processed_router_region = true;
|
$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.
|
// Enqueues as an inline style.
|
||||||
wp_register_style( 'wp-interactivity-router-animations', false );
|
wp_register_style( 'wp-interactivity-router-animations', false );
|
||||||
wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() );
|
wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() );
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue