From 2b232324435e175626e382eaad02fbccc5f45e9b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 17 Mar 2024 12:08:18 -0300 Subject: find: fix up warnOrThrow internal usage --- src/find.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/find.js') diff --git a/src/find.js b/src/find.js index 2d162af..afe34dd 100644 --- a/src/find.js +++ b/src/find.js @@ -114,7 +114,8 @@ function findHelper({ const regexMatch = fullRef.match(keyRefRegex); if (!regexMatch) { - warnOrThrow(mode, `Malformed link reference: "${fullRef}"`); + return warnOrThrow(mode, + `Malformed link reference: "${fullRef}"`); } const typePart = regexMatch[1]; @@ -142,8 +143,8 @@ function findHelper({ } if (!match) { - warnOrThrow(mode, `Didn't match anything for ${colors.bright(fullRef)}`); - return null; + return warnOrThrow(mode, + `Didn't match anything for ${colors.bright(fullRef)}`); } return match; -- cgit 1.3.0-6-gf8a5