Skip to content

Commit 534808e

Browse files
committed
ensure get initiator
1 parent 3c6ca6a commit 534808e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

httpdbg/webapp/static/api.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const global = {
1212
}
1313

1414
function save_request(request_id, request, session_id) {
15-
if (request.initiator_id in global.initiators) { // the initiator may be missing if the clean list is executed in parrallel
15+
const initiator = global.initiators[request.initiator_id] ?? null;
16+
if (initiator !== null) { // the initiator may be missing if the clean list is executed in parrallel
1617
request.loaded = false;
1718
request.to_refresh = true;
1819
if (request.pin == undefined) {
@@ -22,7 +23,7 @@ function save_request(request_id, request, session_id) {
2223
request.filter = "---";
2324
}
2425
request.session_id = session_id;
25-
request.initiator = global.initiators[request.initiator_id];
26+
request.initiator = initiator;
2627

2728
if (request.in_progress) {
2829
request.status_code_view = '<img class="icon" src="static/icons/wait-sandclock-icon.svg-+-$**HTTPDBG_VERSION**$" alt="loading"/>';

0 commit comments

Comments
 (0)