Skip to content

Instantly share code, notes, and snippets.

@dmethvin
Created May 10, 2016 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmethvin/0a9c66f2dc1750ca2c25eaa8f5afc9f5 to your computer and use it in GitHub Desktop.
Save dmethvin/0a9c66f2dc1750ca2c25eaa8f5afc9f5 to your computer and use it in GitHub Desktop.
( 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