From 869052885eedeaf4e146aa43097988e03e4647e7 Mon Sep 17 00:00:00 2001 From: jimchamp Date: Thu, 9 May 2024 16:28:54 -0700 Subject: [PATCH] Handle null `matches` --- scripts/gh_scripts/new_pr_labeler.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gh_scripts/new_pr_labeler.mjs b/scripts/gh_scripts/new_pr_labeler.mjs index a52c5097eb4..7cf94f4e0ef 100644 --- a/scripts/gh_scripts/new_pr_labeler.mjs +++ b/scripts/gh_scripts/new_pr_labeler.mjs @@ -125,5 +125,5 @@ function parseArgs() { function findLinkedIssue(body) { let lowerBody = body.toLowerCase() const matches = lowerBody.match(/closes #(\d+)/) - return matches.length ? Number(matches[1]) : '' + return matches?.length ? Number(matches[1]) : '' }