From d00f71c185123b4d68ab4738e5dc0edae06d6762 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 2 Oct 2023 19:05:37 -0300 Subject: find: don't assume {mode} object to destructure from --- src/find.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/find.js') 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)}`); -- cgit 1.3.0-6-gf8a5