Make WordPress Core

Changeset 59416


Ignore:
Timestamp:
11/18/2024 08:04:35 PM (13 days ago)
Author:
czapla
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/interactivity-api/class-wp-interactivity-api.php

    r59398 r59416  
    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 );
Note: See TracChangeset for help on using the changeset viewer.