From 25e468ca1fe4077bc9a772313bc2c0caddfa981a Mon Sep 17 00:00:00 2001 From: eaftan Date: Mon, 14 Feb 2022 10:07:23 -0800 Subject: [PATCH] Tolerate empty issue body Previously the code was checking whether `issue_body` was falsy. The empty string is considered falsy, which would make this Action fail when the issue body was empty. Instead, explictly compare against `undefined` and tolerate issues with empty bodies. Fixes #33 --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 776abcd..f58edfe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,7 +14,7 @@ async function run() { const issue_number = getIssueNumber(); const issue_body = getIssueBody(); - if (!issue_number || !issue_body) { + if (issue_number === undefined || issue_body === undefined) { console.log('Could not get issue number or issue body from context, exiting'); return; }