From 9ff1e86dcde588dee68430607088321bb57c49c2 Mon Sep 17 00:00:00 2001 From: dmail Date: Fri, 6 Oct 2023 15:16:15 +0200 Subject: [PATCH] fix error when pass/fail called shortly after progress --- packages/github-check-run/package.json | 2 +- packages/github-check-run/src/start_github_check_run.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/github-check-run/package.json b/packages/github-check-run/package.json index cc7282c..822afc0 100644 --- a/packages/github-check-run/package.json +++ b/packages/github-check-run/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/github-check-run", - "version": "0.0.8", + "version": "0.0.9", "description": "Interact with GitHub check rest API", "license": "MIT", "author": { diff --git a/packages/github-check-run/src/start_github_check_run.js b/packages/github-check-run/src/start_github_check_run.js index 6843503..8cf2c2b 100644 --- a/packages/github-check-run/src/start_github_check_run.js +++ b/packages/github-check-run/src/start_github_check_run.js @@ -185,7 +185,7 @@ ${JSON.stringify(body, null, " ")}`); pendingAbortController.signal.onabort = resolve; setTimeout(resolve, msBetweenProgressCalls); }); - if (pendingAbortController.signal.aborted) { + if (pendingAbortController && pendingAbortController.signal.aborted) { return; } pendingAbortController = null;