File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 52915291 ( WeakMap && getTag ( new WeakMap ) != weakMapTag ) ) {
52925292 getTag = function ( value ) {
52935293 var result = objectToString . call ( value ) ,
5294- Ctor = result == objectTag ? value . constructor : null ,
5295- ctorString = toSource ( Ctor ) ;
5294+ Ctor = result == objectTag ? value . constructor : undefined ,
5295+ ctorString = Ctor ? toSource ( Ctor ) : undefined ;
52965296
52975297 if ( ctorString ) {
52985298 switch ( ctorString ) {
57915791 * @returns {string } Returns the source code.
57925792 */
57935793 function toSource ( func ) {
5794- if ( isFunction ( func ) ) {
5794+ if ( func != null ) {
57955795 try {
57965796 return funcToString . call ( func ) ;
57975797 } catch ( e ) { }
5798+ try {
5799+ return ( func + '' ) ;
5800+ } catch ( e ) { }
57985801 }
5799- return toString ( func ) ;
5802+ return '' ;
58005803 }
58015804
58025805 /**
You can’t perform that action at this time.
0 commit comments