1
0
Fork 0

Removed unnecessary try/catch from isInstanceOf

Was just being lazy.
newmaster
Mike Gerwitz 2014-03-29 00:59:42 -04:00
parent d23f34da4b
commit 58ee52ad4a
1 changed files with 6 additions and 8 deletions

View File

@ -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
// constructor (function)
if ( ( typeof type === 'function' )
&& ( instance instanceof type )
)
{ {
// check prototype chain (will throw an error if type is not a return true;
// constructor (function)
if ( instance instanceof type )
{
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