From 937b325dcbf6aa04b399c80f9ff448a8d658bddc Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Thu, 2 May 2024 14:20:26 -0700 Subject: [PATCH] Remove use of optional chaining in client --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 79b8f4dc..f4c0e2cf 100644 --- a/index.js +++ b/index.js @@ -163,7 +163,7 @@ class Replicate { } // We handle the cancel later in the function. - if (signal?.aborted) { + if (signal && signal.aborted) { return true; // stop polling } @@ -171,7 +171,7 @@ class Replicate { } ); - if (signal?.aborted) { + if (signal && signal.aborted) { prediction = await this.predictions.cancel(prediction.id); }