From eb12a115268671ad324aa437d91c170e5843f4bb Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 12 Jan 2025 18:56:56 -0400 Subject: cacheable-object: remove 900,000 functions --- src/find.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/find.js') diff --git a/src/find.js b/src/find.js index c7813e32..e590bc4f 100644 --- a/src/find.js +++ b/src/find.js @@ -34,7 +34,7 @@ export function processAvailableMatchesByName(data, { include = _thing => true, getMatchableNames = thing => - (Object.hasOwn(thing, 'name') + (thing.constructor.hasPropertyDescriptor('name') ? [thing.name] : []), @@ -72,7 +72,7 @@ export function processAvailableMatchesByDirectory(data, { include = _thing => true, getMatchableDirectories = thing => - (Object.hasOwn(thing, 'directory') + (thing.constructor.hasPropertyDescriptor('directory') ? [thing.directory] : [null]), -- cgit 1.3.0-6-gf8a5