Skip to content

Commit

Permalink
Accept undefined errorObject, hopefully fixes #85
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Feb 3, 2021
1 parent 5af9b6c commit 98b3311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LoggerWithoutCallSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ export class LoggerWithoutCallSite {
argumentsArray: logObject.argumentsArray.map(
(argument: unknown | IErrorObject) => {
const errorObject: IErrorObject = argument as IErrorObject;
if (typeof argument === "object" && errorObject.isError) {
if (typeof argument === "object" && errorObject?.isError) {
return {
...errorObject,
nativeError: undefined,
Expand Down

0 comments on commit 98b3311

Please sign in to comment.