File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
debug_toolbar/static/debug_toolbar/js Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1717 },
1818 "style" : {
1919 "noArguments" : " off" ,
20- "noParameterAssign" : " off" ,
2120 "useTemplate" : " off"
2221 },
2322 "suspicious" : {
Original file line number Diff line number Diff line change @@ -297,11 +297,11 @@ const djdt = {
297297 const slowjax = debounce ( ajax , 200 ) ;
298298
299299 function handleAjaxResponse ( storeId ) {
300- storeId = encodeURIComponent ( storeId ) ;
301- const dest = `${ sidebarUrl } ?store_id=${ storeId } ` ;
300+ const encodedStoreId = encodeURIComponent ( storeId ) ;
301+ const dest = `${ sidebarUrl } ?store_id=${ encodedStoreId } ` ;
302302 slowjax ( dest ) . then ( function ( data ) {
303303 if ( djdt . needUpdateOnFetch ) {
304- replaceToolbarState ( storeId , data ) ;
304+ replaceToolbarState ( encodedStoreId , data ) ;
305305 }
306306 } ) ;
307307 }
@@ -352,9 +352,7 @@ const djdt = {
352352
353353 return cookies [ key ] ;
354354 } ,
355- set ( key , value , options ) {
356- options = options || { } ;
357-
355+ set ( key , value , options = { } ) {
358356 if ( typeof options . expires === "number" ) {
359357 const days = options . expires ;
360358 const t = ( options . expires = new Date ( ) ) ;
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ const $$ = {
7171} ;
7272
7373function ajax ( url , init ) {
74- init = Object . assign ( { credentials : "same-origin" } , init ) ;
75- return fetch ( url , init )
74+ return fetch ( url , Object . assign ( { credentials : "same-origin" } , init ) )
7675 . then ( function ( response ) {
7776 if ( response . ok ) {
7877 return response . json ( ) . catch ( function ( error ) {
You can’t perform that action at this time.
0 commit comments