Permalink
Browse files

Make sure err.stack is there before calling replace on it.

  • Loading branch information...
1 parent a632633 commit fec32aa1e0269100ed228007315468ec76660247 @davglass committed Jan 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/expresso
View
@@ -711,7 +711,7 @@ function runFile(file, fn) {
function error(suite, test, err) {
++failures;
var name = err.name,
- stack = err.stack.replace(err.name, ''),
+ stack = err.stack ? err.stack.replace(err.name, '') : '',
label = test === 'uncaught'
? test
: suite + ' ' + test;

0 comments on commit fec32aa

Please sign in to comment.