Fix harmless "Not well-formed" console message from renamed-styles.json
This commit is contained in:
parent
d7b75aaa80
commit
3ff56a7d55
1 changed files with 6 additions and 2 deletions
|
@ -50,10 +50,14 @@ Zotero.Styles = new function() {
|
|||
// synchronous call we were using breaks the first drag of the session (on OS X, at least)
|
||||
this.preinit = function () {
|
||||
_renamedStyles = {};
|
||||
Zotero.HTTP.promise("GET", "resource://zotero/schema/renamed-styles.json")
|
||||
Zotero.HTTP.promise(
|
||||
"GET", "resource://zotero/schema/renamed-styles.json", { responseType: 'json' }
|
||||
)
|
||||
.then(function (xmlhttp) {
|
||||
// Map some obsolete styles to current ones
|
||||
_renamedStyles = JSON.parse(xmlhttp.responseText);
|
||||
if (xmlhttp.response) {
|
||||
_renamedStyles = xmlhttp.response;
|
||||
}
|
||||
})
|
||||
.done();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue