Don't use document.defaultView as a security principal if it is null

This commit is contained in:
Simon Kornblith 2012-04-08 22:38:42 -04:00
parent a22da78f18
commit 9074c09cc3

View file

@ -1428,7 +1428,7 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function
Zotero.Translate.Web.prototype._getSandboxLocation = function() {
if(this._parentTranslator) {
return this._parentTranslator._sandboxLocation;
} else if("defaultView" in this.document) {
} else if(this.document.defaultView) {
return this.document.defaultView;
} else {
return this.document.location.toString();