Skip to content

Commit

Permalink
Fixing #25
Browse files Browse the repository at this point in the history
  • Loading branch information
kraklin committed Jun 25, 2020
1 parent 33557b3 commit 8688f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export function register(opts: IOptions | undefined) {
: new JsonMLFormatter();

console.log = function() {
if (arguments.length > 1) {
if (!arguments || arguments.length > 1) {
log.apply(console, arguments);
return;
}
const msg = arguments[0];

if (msg.length > opts.limit) {
if (!msg || msg.length > opts.limit) {
log.call(console, msg);
return;
}
Expand Down

0 comments on commit 8688f8f

Please sign in to comment.