Fixed test failures in Chrome and Edge

This commit is contained in:
Steve Gravrock
2021-07-19 12:02:42 -07:00
parent 3513249d73
commit c1d1d69be2
2 changed files with 10 additions and 6 deletions

View File

@@ -267,6 +267,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
};
j$.isError_ = function(value) {
if (!value) {
return false;
}
if (value instanceof Error) {
return true;
}
@@ -275,9 +279,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
typeof window.trustedTypes !== 'undefined'
) {
return (
value &&
typeof value.stack === 'string' &&
typeof value.message === 'string'
typeof value.stack === 'string' && typeof value.message === 'string'
);
}
if (value && value.constructor && value.constructor.constructor) {

View File

@@ -99,6 +99,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
};
j$.isError_ = function(value) {
if (!value) {
return false;
}
if (value instanceof Error) {
return true;
}
@@ -107,9 +111,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
typeof window.trustedTypes !== 'undefined'
) {
return (
value &&
typeof value.stack === 'string' &&
typeof value.message === 'string'
typeof value.stack === 'string' && typeof value.message === 'string'
);
}
if (value && value.constructor && value.constructor.constructor) {