Skip to content

Commit

Permalink
Preventing lack of arguments from breaking IE9, as reported by @lpena
Browse files Browse the repository at this point in the history
  • Loading branch information
eriwen committed Feb 20, 2012
1 parent 6f74fe1 commit 695979e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stacktrace.js
Expand Up @@ -223,7 +223,7 @@ printStackTrace.implementation.prototype = {
// Safari, IE, and others
other: function(curr) {
var ANON = '{anonymous}', fnRE = /function\s*([\w\-$]+)?\s*\(/i, stack = [], fn, args, maxStackSize = 10;
while (curr && stack.length < maxStackSize) {
while (curr && curr['arguments'] && stack.length < maxStackSize) {
fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON;
args = Array.prototype.slice.call(curr['arguments'] || []);
stack[stack.length] = fn + '(' + this.stringifyArguments(args) + ')';
Expand Down

0 comments on commit 695979e

Please sign in to comment.