fx-compat: Fix _getExtensionFromURL()

This commit is contained in:
Abe Jellinek 2022-05-24 12:07:30 -06:00
parent 300af4477f
commit 87decd0f8d

View file

@ -2842,9 +2842,8 @@ Zotero.Attachments = new function(){
this._getExtensionFromURL = function(url, contentType) {
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIURL);
nsIURL.spec = url;
var nsIURL = Services.io.newURI(url)
.QueryInterface(Ci.nsIURL);
return Zotero.MIME.getPrimaryExtension(contentType, nsIURL.fileExtension);
}