Skip to content

Commit 13f23ed

Browse files
committedOct 11, 2023
[Fix] default_stream: add handling for IE < 9
1 parent 9135b40 commit 13f23ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎lib/default_stream.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ module.exports = function () {
3030
}
3131
} else {
3232
try {
33-
console.log(line); // eslint-disable-line no-console
33+
if (typeof console !== 'undefined' && console.log) { // eslint-disable-line no-console
34+
console.log(line); // eslint-disable-line no-console
35+
} else if (typeof document !== 'undefined') {
36+
// for IE < 9
37+
document.body.innerHTML += line + '<br />';
38+
}
3439
} catch (e) {
3540
stream.emit('error', e);
3641
}

0 commit comments

Comments
 (0)
Please sign in to comment.