Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
node test-packet-filter-time.js
node test-confidence-indicator.js
node test-1659-analytics-warmup.js
node test-app-api-inflight-cleanup-rejection.js
node test-channels-merge-1498-unit.js
node test-issue-1518-home-url.js
node test-channel-decrypt-insecure-context.js
Expand Down
8 changes: 7 additions & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,13 @@ async function api(path, { ttl = 0, bust = false } = {}) {
}
})();
_inflight.set(path, promise);
promise.finally(() => _inflight.delete(path));
// `.finally()` returns its own derived promise that mirrors `promise`'s
// outcome; discarding it uncaught leaves the real caller's rejection
// (delivered via the returned `promise` below, unaffected by this)
// duplicated as a second, unobserved rejection on this derived one.
// The `.catch()` here only silences that duplicate -- it does not
// touch `promise` itself or its resolution to callers.
promise.finally(() => _inflight.delete(path)).catch(() => {});
return promise;
}

Expand Down
1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ node test-packet-filter-ux.js
node test-aging.js
node test-issue-1065-gesture-hints-gates.js
node test-frontend-helpers.js
node test-app-api-inflight-cleanup-rejection.js
node test-privacy-page.js
node test-nav-dynamic-link-lifecycle.js
node test-nav-first-load-fit.js
Expand Down
Loading
Loading