File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
projects/packages/forms/src/dashboard Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,8 @@ public function load_admin_scripts() {
118118 // Normalize keys to match what apiFetch will request (without domain).
119119 $ preload_data = array ();
120120 foreach ( $ preload_data_raw as $ key => $ value ) {
121- $ normalized_key = preg_replace ( '#^https?://[^/]+/wp-json# ' , '' , $ key );
122- $ preload_data [ $ normalized_key ] = $ value ;
123- $ preload_data [ ltrim ( $ normalized_key , '/ ' ) ] = $ value ;
121+ $ normalized_key = preg_replace ( '#^https?://[^/]+/wp-json# ' , '' , $ key );
122+ $ preload_data [ $ normalized_key ] = $ value ;
124123 }
125124
126125 wp_add_inline_script (
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export const getFilters =
66 ( ) =>
77 async ( { dispatch } ) => {
88 const results = await apiFetch ( {
9- path : 'wp/v2/feedback/filters' ,
9+ path : '/ wp/v2/feedback/filters' ,
1010 } ) ;
1111 dispatch . receiveFilters ( results ) ;
1212 } ;
You can’t perform that action at this time.
0 commit comments