Skip to content

Commit 301f2cd

Browse files
matthiaskdr-rompecabezas
authored andcommitted
Enable the noArguments rule
1 parent 964b6d8 commit 301f2cd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

biome.json

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"noForEach": "off"
1717
},
1818
"style": {
19-
"noArguments": "off",
2019
"useTemplate": "off"
2120
},
2221
"suspicious": {

debug_toolbar/static/debug_toolbar/js/toolbar.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const djdt = {
308308

309309
// Patch XHR / traditional AJAX requests
310310
const origOpen = XMLHttpRequest.prototype.open;
311-
XMLHttpRequest.prototype.open = function () {
311+
XMLHttpRequest.prototype.open = function (...args) {
312312
this.addEventListener("load", function () {
313313
// Chromium emits a "Refused to get unsafe header" uncatchable warning
314314
// when the header can't be fetched. While it doesn't impede execution
@@ -319,12 +319,12 @@ const djdt = {
319319
handleAjaxResponse(this.getResponseHeader("djdt-store-id"));
320320
}
321321
});
322-
origOpen.apply(this, arguments);
322+
origOpen.apply(this, args);
323323
};
324324

325325
const origFetch = window.fetch;
326-
window.fetch = function () {
327-
const promise = origFetch.apply(this, arguments);
326+
window.fetch = function (...args) {
327+
const promise = origFetch.apply(this, args);
328328
promise.then(function (response) {
329329
if (response.headers.get("djdt-store-id") !== null) {
330330
handleAjaxResponse(response.headers.get("djdt-store-id"));

0 commit comments

Comments
 (0)