Skip to content

Commit ae63f56

Browse files
Minor code optimization
1 parent c4abc61 commit ae63f56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stacktrace.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@
268268
// Safari 5-, IE 9-, and others
269269
other: function(curr) {
270270
var ANON = '{anonymous}', fnRE = /function\s*([\w\-$]+)?\s*\(/i, stack = [], fn, args, maxStackSize = 10;
271+
var slice = Array.prototype.slice;
271272
while (curr && curr['arguments'] && stack.length < maxStackSize) {
272273
fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON;
273-
args = Array.prototype.slice.call(curr['arguments'] || []);
274+
args = slice.call(curr['arguments'] || []);
274275
stack[stack.length] = fn + '(' + this.stringifyArguments(args) + ')';
275276
try {
276277
curr = curr.caller;

0 commit comments

Comments
 (0)