Skip to content

Commit

Permalink
[Fix] default_stream: add handling for IE < 9
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 11, 2023
1 parent 9135b40 commit 13f23ed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/default_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ module.exports = function () {
}
} else {
try {
console.log(line); // eslint-disable-line no-console
if (typeof console !== 'undefined' && console.log) { // eslint-disable-line no-console
console.log(line); // eslint-disable-line no-console
} else if (typeof document !== 'undefined') {
// for IE < 9
document.body.innerHTML += line + '<br />';
}
} catch (e) {
stream.emit('error', e);
}
Expand Down

0 comments on commit 13f23ed

Please sign in to comment.