« get me outta code hell

find: don't assume {mode} object to destructure from - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
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
commit1f0207c93a124da2b451f8c21c105e177d92fd12 (patch)
treeff9a14157395f88eb4b03d9ff37047cfcc0c4d7c /src
parentee21d8aca60fe4f44f02e86b545b7f42058e67c5 (diff)
find: don't assume {mode} object to destructure from
Diffstat (limited to 'src')
-rw-r--r--src/find.js2
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)}`);