Skip to content

Commit

Permalink
fix(Default handler): Optional call to avoid exception if process doe…
Browse files Browse the repository at this point in the history
…s not have an exit method
  • Loading branch information
nokome committed Oct 16, 2020
1 parent 60a4a8f commit 9cf7e6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ export function defaultHandler(
exitOnError &&
level === LogLevel.error
) {
process.exit(1)
// Optional call to avoid exception if process does not have an exit method
// See https://github.com/stencila/logga/issues/68#issuecomment-710114596
process.exit?.(1)
}
}

Expand Down

0 comments on commit 9cf7e6e

Please sign in to comment.