Fix code for determining whether to use defaultView as sandbox scope
This commit is contained in:
parent
0417a1910d
commit
a0f1bbf8a6
1 changed files with 3 additions and 1 deletions
|
@ -1584,7 +1584,9 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function
|
|||
Zotero.Translate.Web.prototype._getSandboxLocation = function() {
|
||||
if(this._parentTranslator) {
|
||||
return this._parentTranslator._sandboxLocation;
|
||||
} else if(this.document.defaultView && this.document.defaultView.toString() === "[object Window]") {
|
||||
} else if(this.document.defaultView
|
||||
&& (this.document.defaultView.toString().indexOf("Window") !== -1
|
||||
|| this.document.defaultView.toString().indexOf("XrayWrapper") !== -1)) {
|
||||
return this.document.defaultView;
|
||||
} else {
|
||||
return this.document.location.toString();
|
||||
|
|
Loading…
Reference in a new issue