parent
0228de6218
commit
dd0b632274
|
@ -244,16 +244,14 @@ exports.isInstanceOf = function( type, instance )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// check prototype chain (will throw an error if type is not a
|
// check prototype chain (will throw an error if type is not a
|
||||||
// constructor (function)
|
// constructor (function)
|
||||||
if ( instance instanceof type )
|
if ( ( typeof type === 'function' )
|
||||||
|
&& ( instance instanceof type )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch ( e ) {}
|
|
||||||
|
|
||||||
// if no metadata is available, then our remaining checks cannot be
|
// if no metadata is available, then our remaining checks cannot be
|
||||||
// performed
|
// performed
|
||||||
|
|
Loading…
Reference in New Issue