Handle WebSocket events in IE when detecting Errors

- Fixes #1623
This commit is contained in:
Gregg Van Hove
2019-04-01 18:52:27 -07:00
parent 5c7e25e228
commit 618e24b2f8
2 changed files with 39 additions and 3 deletions

View File

@@ -89,9 +89,15 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
if (value instanceof Error) {
return true;
}
if (value && value.constructor && value.constructor.constructor &&
(value instanceof (value.constructor.constructor('return this')()).Error)) {
return true;
if (value && value.constructor && value.constructor.constructor) {
var valueGlobal = value.constructor.constructor('return this');
if (j$.isFunction_(valueGlobal)) {
valueGlobal = valueGlobal();
}
if (valueGlobal.Error && value instanceof valueGlobal.Error) {
return true;
}
}
return false;
};