From 2200332c40416b906b1a86e318f720999bfc0c72 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 25 Jun 2024 10:51:56 -0500 Subject: [PATCH] fix: check object type for in operator --- app/util/fast-call.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/util/fast-call.js b/app/util/fast-call.js index 3329ee5..71f4315 100644 --- a/app/util/fast-call.js +++ b/app/util/fast-call.js @@ -1,7 +1,7 @@ export default function(fn, holder, args) { if (holder) { const {name} = fn; - if (name in holder && holder[name] === fn) { + if ('object' === typeof holder && name in holder && holder[name] === fn) { switch (args.length) { case 0 : return holder[name](); case 1 : return holder[name](args[0]);