mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Properly install styles with BOMs from disk
This commit is contained in:
parent
2b8c28ccaf
commit
a334ac9f60
1 changed files with 3 additions and 3 deletions
|
|
@ -187,9 +187,9 @@ Zotero.Styles = new function() {
|
|||
var styleInstalled;
|
||||
if(style instanceof Components.interfaces.nsIFile) {
|
||||
// handle nsIFiles
|
||||
origin = style.leafName;
|
||||
styleInstalled = Zotero.File.getContentsAsync(style).when(function(style) {
|
||||
return _install(style, origin);
|
||||
var url = Services.io.newFileURI(style);
|
||||
styleInstalled = Zotero.HTTP.promise("GET", url.spec).when(function(xmlhttp) {
|
||||
return _install(xmlhttp.responseText, style.leafName);
|
||||
});
|
||||
} else {
|
||||
styleInstalled = _install(style, origin);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue