From b25e53a2122dd747d32941bc8cd5f8ad353eb616 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 23 Jan 2023 18:04:22 -0500 Subject: [PATCH 1/2] Remove abort controller for defer with only critical data --- packages/router/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/router/utils.ts b/packages/router/utils.ts index 8506e709a1..172d52c36a 100644 --- a/packages/router/utils.ts +++ b/packages/router/utils.ts @@ -1192,6 +1192,11 @@ export class DeferredData { {} ); + if (this.done) { + // All incoming values were resolved + this.unlistenAbortSignal(); + } + this.init = responseInit; } From f81132a7d1269df0c3bed04c26282abd7ba91073 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 23 Jan 2023 18:29:57 -0500 Subject: [PATCH 2/2] Add changeset --- .changeset/spotty-cheetahs-live.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/spotty-cheetahs-live.md diff --git a/.changeset/spotty-cheetahs-live.md b/.changeset/spotty-cheetahs-live.md new file mode 100644 index 0000000000..d5b34158d0 --- /dev/null +++ b/.changeset/spotty-cheetahs-live.md @@ -0,0 +1,5 @@ +--- +"@remix-run/router": patch +--- + +Detect no lazy data and remove abort controller for defer