Skip to content

Commit

Permalink
fix: log can be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha authored Nov 11, 2016
1 parent 5f08bbd commit 008569a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var MochaReporter = function (baseReporterDecorator, formatError, config) {

// add the error log in error color
item.log = item.log || [];
var log = item.log.length ? item.log[0].split('\n') : '';
var log = item.log.length ? item.log[0].split('\n') : [];
var linesToLog = config.mochaReporter.maxLogLines;
var ii = 0;

Expand Down

0 comments on commit 008569a

Please sign in to comment.