diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-17 12:08:18 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-03-17 12:08:32 -0300 |
commit | 2b232324435e175626e382eaad02fbccc5f45e9b (patch) | |
tree | 2ca979e0f0327a9eb73762297b59c3b48f8d5b2a | |
parent | b9e441d8e1d89fd7c89674eb08201073c16fd955 (diff) |
find: fix up warnOrThrow internal usage
-rw-r--r-- | src/find.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/find.js b/src/find.js index 2d162af2..afe34dd9 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; |