Skip to content

Commit

Permalink
error stack 兼容性
Browse files Browse the repository at this point in the history
  • Loading branch information
Shirtiny committed Aug 3, 2023
1 parent b285ab1 commit 00c6e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/shLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class ShLogger extends Logger {
error = (error: any, ...data: any[]) => {
this.formatShapeLog(
logTypes.error,
`${error instanceof Error ? error.stack : error}\n`,
`${error?.stack || error}\n`,
...data,
);
};
Expand Down

0 comments on commit 00c6e5a

Please sign in to comment.