From 2550eb9746f5ce7732234c538e52888ac47bd984 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sat, 4 Nov 2023 23:38:24 +0800 Subject: [PATCH] test: make tests run on Node.js 12 --- packages/fetch-retry/test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/fetch-retry/test.js b/packages/fetch-retry/test.js index 99a4bf6..124b694 100644 --- a/packages/fetch-retry/test.js +++ b/packages/fetch-retry/test.js @@ -180,7 +180,9 @@ test("don't retry if the request was aborted after timeout", async () => { const timeoutHandler = setTimeout(() => { ponyfilledController.abort(); - nativeController?.abort(); + if (nativeController) { + nativeController.abort(); + } }, timeout); const opts1 = {