csnover / TraceKit

Attempts to create stack traces for unhandled JavaScript exceptions in all major browsers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setTimeout, setInterval wrappers return undefined instead of the handle

rdw opened this issue · comments

Too lazy to do a pull request; here's a patch:

--- tracekit.js 2011-01-02 16:54:15.000000000 -0800
+++ tk2.js      2011-01-03 17:59:31.699916000 -0800
@@ -971,7 +971,7 @@
                          }
                };

-               _oldSetTimeout.apply(this, arguments);
+               return _oldSetTimeout.apply(this, arguments);
        };

        // If you are reading this, you should know that setInterval is
@@ -991,7 +991,7 @@
                        }
                };

-               _oldSetInterval.apply(this, arguments);
+               return _oldSetInterval.apply(this, arguments);
        };
 }(window));

Yep. Fixed it.