Skip parsing cause if it is not an Error object

* Merges #2013 from @angrycat9000
    * Fixes #2011
This commit is contained in:
angrycat9000
2023-07-19 10:00:50 -04:00
committed by Steve Gravrock
parent 80b9d6c2e0
commit 8bc95ae2e3
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'
});