mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2701 from davidfiala/patch-1
Resolve exception when Error.stackTraceLimit is undefined
This commit is contained in:
commit
74e4da5cc6
|
@ -110,7 +110,7 @@ export type ClientOptions = Partial<ChannelOptions> & {
|
|||
};
|
||||
|
||||
function getErrorStackString(error: Error): string {
|
||||
return error.stack!.split('\n').slice(1).join('\n');
|
||||
return error.stack?.split('\n').slice(1).join('\n') || 'no stack trace available';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue