diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-02 19:05:37 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-03 19:01:02 -0400 |
commit | 1f0207c93a124da2b451f8c21c105e177d92fd12 (patch) | |
tree | ff9a14157395f88eb4b03d9ff37047cfcc0c4d7c | |
parent | ee21d8aca60fe4f44f02e86b545b7f42058e67c5 (diff) |
find: don't assume {mode} object to destructure from
-rw-r--r-- | src/find.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/find.js b/src/find.js index 4d3e996a..b5ca70b2 100644 --- a/src/find.js +++ b/src/find.js @@ -77,7 +77,7 @@ function findHelper({ // errors for null matches (with details about the error), while 'warn' and // 'quiet' both return null, with 'warn' logging details directly to the // console. - return (fullRef, data, {mode = 'warn'}) => { + return (fullRef, data, {mode = 'warn'} = {}) => { if (!fullRef) return null; if (typeof fullRef !== 'string') { throw new TypeError(`Expected a string, got ${typeAppearance(fullRef)}`); |