Merge branch 'iserror-tt' of https://github.com/bjarkler/jasmine into main
* Fixes Trusted Types error in Chromium-based browsers * Merges #1921 from @bjarkler * Fixes #1910
This commit is contained in:
@@ -270,6 +270,16 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
if (value instanceof Error) {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
typeof window.trustedTypes !== 'undefined'
|
||||
) {
|
||||
return (
|
||||
value &&
|
||||
typeof value.stack === 'string' &&
|
||||
typeof value.message === 'string'
|
||||
);
|
||||
}
|
||||
if (value && value.constructor && value.constructor.constructor) {
|
||||
var valueGlobal = value.constructor.constructor('return this');
|
||||
if (j$.isFunction_(valueGlobal)) {
|
||||
|
||||
@@ -102,6 +102,16 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
if (value instanceof Error) {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
typeof window.trustedTypes !== 'undefined'
|
||||
) {
|
||||
return (
|
||||
value &&
|
||||
typeof value.stack === 'string' &&
|
||||
typeof value.message === 'string'
|
||||
);
|
||||
}
|
||||
if (value && value.constructor && value.constructor.constructor) {
|
||||
var valueGlobal = value.constructor.constructor('return this');
|
||||
if (j$.isFunction_(valueGlobal)) {
|
||||
|
||||
Reference in New Issue
Block a user