diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index 3a8d2e917..6f0eb036f 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -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) {