Skip parsing cause if it is not an Error object

This commit is contained in:
angrycat9000
2023-07-19 10:00:50 -04:00
parent e56bd3918b
commit 2ddb344bac
2 changed files with 21 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
lines.unshift(stackTrace.message);
}
if (error.cause) {
if (error.cause && error.cause instanceof Error) {
const substack = this.stack_(error.cause, {
messageHandling: 'require'
});