Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/core-js/internals/object-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ var NullProtoObject = function () {
try {
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = document.domain && activeXDocument ?
NullProtoObjectViaActiveX(activeXDocument) : // old IE
NullProtoObjectViaIFrame() ||
NullProtoObjectViaActiveX(activeXDocument); // WSH
if (activeXDocument) {
if (typeof(document) !== 'undefined') {
NullProtoObject = document.domain ?
NullProtoObjectViaActiveX(activeXDocument) : // old IE
NullProtoObjectViaIFrame();
} else {
NullProtoObject = NullProtoObjectViaActiveX(activeXDocument); // WSH
}
}
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
Expand Down