File tree 3 files changed +5
-9
lines changed
debug_toolbar/static/debug_toolbar/js
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 17
17
},
18
18
"style" : {
19
19
"noArguments" : " off" ,
20
- "noParameterAssign" : " off" ,
21
20
"useTemplate" : " off"
22
21
},
23
22
"suspicious" : {
Original file line number Diff line number Diff line change @@ -297,11 +297,11 @@ const djdt = {
297
297
const slowjax = debounce ( ajax , 200 ) ;
298
298
299
299
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 } ` ;
302
302
slowjax ( dest ) . then ( function ( data ) {
303
303
if ( djdt . needUpdateOnFetch ) {
304
- replaceToolbarState ( storeId , data ) ;
304
+ replaceToolbarState ( encodedStoreId , data ) ;
305
305
}
306
306
} ) ;
307
307
}
@@ -352,9 +352,7 @@ const djdt = {
352
352
353
353
return cookies [ key ] ;
354
354
} ,
355
- set ( key , value , options ) {
356
- options = options || { } ;
357
-
355
+ set ( key , value , options = { } ) {
358
356
if ( typeof options . expires === "number" ) {
359
357
const days = options . expires ;
360
358
const t = ( options . expires = new Date ( ) ) ;
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ const $$ = {
71
71
} ;
72
72
73
73
function 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 ) )
76
75
. then ( function ( response ) {
77
76
if ( response . ok ) {
78
77
return response . json ( ) . catch ( function ( error ) {
You can’t perform that action at this time.
0 commit comments