[jQuery 3.2.1, Internet Explorer, Edge] $.isPlainObject fails when passed object has been created in child (popup) browser window

[jQuery 3.2.1, Internet Explorer, Edge] $.isPlainObject fails when passed object has been created in child (popup) browser window

We have two JS controls - viewer (displays images) and thumbnailer (displays thumbnails).
By default they both are located in main browser window but there is a possibility to "undock" viewer from main window and have it in separate popup browser window.

We have no issues when using jQuery 2.1.4. But after upgrade to jQuery 3.2.1 we get the following error:




Here $.isPlainObject function is being called as a part of $.extend function call. Object that is being passed to $.isPlainObject has been created in child (popup) browser window. Problem occurs only in IE and Edge. FF and GC have no issues.

I have applied temporal workaround and change $.isPlainObject function on fly to 2.1.4 implementation:

      isPlainObject: function( obj ) {
// Not plain objects:
// - Any object or value whose internal [[Class]] property is not "[object Object]"
// - DOM nodes
// - window
if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
return false;
}

if ( obj.constructor &&
!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
return false;
}

// If the function hasn't returned already, we're confident that
// |obj| is a plain object, created by {} or constructed with new Object
return true;
}

I am not sure this is a good solution but I have no idea how to fix it differently.
Any ideas much appreciated!
Thanks.