Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 21, 2022
1 parent 69ef753 commit 5ecede6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions debug_toolbar/static/debug_toolbar/js/toolbar.js
Expand Up @@ -285,19 +285,19 @@ const djdt = {
origOpen.apply(this, arguments);
};

const origFetch = window.fetch
window.fetch = function(url, options) {
const promise = origFetch(url, options)
promise.then(function(response) {
const origFetch = window.fetch;
window.fetch = function (url, options) {
const promise = origFetch(url, options);
promise.then(function (response) {
if (response.headers.get("djdt-store-id") != null) {
handleAjaxResponse(response.headers.get("djdt-store-id"));
}
// Don't resolve the response via .json(). Instead
// continue to return it to allow the caller to consume as needed.
return response
})
return promise
}
return response;
});
return promise;
};
},
cookie: {
get(key) {
Expand Down

0 comments on commit 5ecede6

Please sign in to comment.