Created
May 10, 2016 21:22
-
-
Save dmethvin/0a9c66f2dc1750ca2c25eaa8f5afc9f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function( factory ) { | |
if ( typeof define === "function" && define.amd ) { | |
define( "jquery-deferred-reporter", [ "jquery" ], factory ); | |
} else if ( typeof module === "object" && module.exports ) { | |
module.exports = factory( require( "jquery" ) ); | |
} else { | |
factory( jQuery ); | |
} | |
}( function( jQuery ) { | |
function getStackHook() { | |
// Throw an error so we can extract the stack from the Error | |
try { | |
throw new Error( "Exception in jQuery.Deferred" ); | |
} catch ( err ) { | |
return err.stack; | |
} | |
} | |
return jQuery.Deferred.getStackHook = getStackHook; | |
} ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment