From 14cf93608a556cd2d66534fbd65af079a7baa686 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 24 Sep 2024 13:41:32 +0200 Subject: [PATCH] Restore some server-side init --- .../class-wp-interactivity-api.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 1f4c5aeb9efba..8bddf88489f36 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -1031,16 +1031,16 @@ 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. + /* + * 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' => array( - 'texts' => array( - 'loading' => __( 'Loading page, please wait.' ), - 'loaded' => __( 'Page Loaded.' ), - ), - ), + 'navigation' => new stdClass(), ) );