@@ -37,13 +37,13 @@ const djdt = {
3737 const inner = current . querySelector (
3838 ".djDebugPanelContent .djdt-scroll"
3939 ) ,
40- storeId = djDebug . dataset . storeId ;
41- if ( storeId && inner . children . length === 0 ) {
40+ requestId = djDebug . dataset . requestId ;
41+ if ( requestId && inner . children . length === 0 ) {
4242 const url = new URL (
4343 djDebug . dataset . renderPanelUrl ,
4444 window . location
4545 ) ;
46- url . searchParams . append ( "store_id " , storeId ) ;
46+ url . searchParams . append ( "request_id " , requestId ) ;
4747 url . searchParams . append ( "panel_id" , panelId ) ;
4848 ajax ( url ) . then ( function ( data ) {
4949 inner . previousElementSibling . remove ( ) ; // Remove AJAX loader
@@ -270,11 +270,11 @@ const djdt = {
270270 document . getElementById ( "djDebug" ) . dataset . sidebarUrl ;
271271 const slowjax = debounce ( ajax , 200 ) ;
272272
273- function handleAjaxResponse ( storeId ) {
274- storeId = encodeURIComponent ( storeId ) ;
275- const dest = `${ sidebarUrl } ?store_id =${ storeId } ` ;
273+ function handleAjaxResponse ( requestId ) {
274+ requestId = encodeURIComponent ( requestId ) ;
275+ const dest = `${ sidebarUrl } ?request_id =${ requestId } ` ;
276276 slowjax ( dest ) . then ( function ( data ) {
277- replaceToolbarState ( storeId , data ) ;
277+ replaceToolbarState ( requestId , data ) ;
278278 } ) ;
279279 }
280280
@@ -286,9 +286,11 @@ const djdt = {
286286 // when the header can't be fetched. While it doesn't impede execution
287287 // it's worrisome to developers.
288288 if (
289- this . getAllResponseHeaders ( ) . indexOf ( "djdt-store -id" ) >= 0
289+ this . getAllResponseHeaders ( ) . indexOf ( "djdt-request -id" ) >= 0
290290 ) {
291- handleAjaxResponse ( this . getResponseHeader ( "djdt-store-id" ) ) ;
291+ handleAjaxResponse (
292+ this . getResponseHeader ( "djdt-request-id" )
293+ ) ;
292294 }
293295 } ) ;
294296 origOpen . apply ( this , arguments ) ;
@@ -298,8 +300,8 @@ const djdt = {
298300 window . fetch = function ( ) {
299301 const promise = origFetch . apply ( this , arguments ) ;
300302 promise . then ( function ( response ) {
301- if ( response . headers . get ( "djdt-store -id" ) !== null ) {
302- handleAjaxResponse ( response . headers . get ( "djdt-store -id" ) ) ;
303+ if ( response . headers . get ( "djdt-request -id" ) !== null ) {
304+ handleAjaxResponse ( response . headers . get ( "djdt-request -id" ) ) ;
303305 }
304306 // Don't resolve the response via .json(). Instead
305307 // continue to return it to allow the caller to consume as needed.
0 commit comments