Skip to content

Commit 0644d0e

Browse files
authored
Merge pull request #1380 from jdufresne/unnecessary-guard
Remove unnecessary guard in refresh history callback
2 parents 87f8209 + 1206941 commit 0644d0e

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

debug_toolbar/static/debug_toolbar/js/history.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ $$.on(djDebug, "click", ".refreshHistory", function (event) {
2929
event.preventDefault();
3030
const container = djDebug.querySelector("#djdtHistoryRequests");
3131
ajaxForm(this).then(function (data) {
32-
if (data.requests.constructor === Array) {
33-
data.requests.forEach(function (request) {
34-
if (
35-
!container.querySelector(
36-
'[data-store-id="' + request.id + '"]'
37-
)
38-
) {
39-
container.innerHTML = request.content + container.innerHTML;
40-
}
41-
});
42-
}
32+
data.requests.forEach(function (request) {
33+
if (
34+
!container.querySelector('[data-store-id="' + request.id + '"]')
35+
) {
36+
container.innerHTML = request.content + container.innerHTML;
37+
}
38+
});
4339
});
4440
});

0 commit comments

Comments
 (0)