From 1f0207c93a124da2b451f8c21c105e177d92fd12 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 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)}`); -- cgit 1.3.0-6-gf8a5