fix: check object type for in operator
This commit is contained in:
parent
13b2a63f07
commit
2200332c40
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user