diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-02 19:05:37 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-02 19:05:37 -0300 |
commit | d00f71c185123b4d68ab4738e5dc0edae06d6762 (patch) | |
tree | 896e72c585f93870ba2138ac6d3300ffa327f829 /src | |
parent | 161db8862cef023f5076c4495e48202d54d8b84a (diff) |
find: don't assume {mode} object to destructure from
Diffstat (limited to 'src')
-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 c8edce98..716aca5e 100644 --- a/src/find.js +++ b/src/find.js @@ -69,7 +69,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)}`); |