From 3ff56a7d555627f26e196a4cde26cbb4a447c9c3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 19 Mar 2014 06:00:05 -0400 Subject: [PATCH] Fix harmless "Not well-formed" console message from renamed-styles.json --- chrome/content/zotero/xpcom/style.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 2568a4ba6e..8202ae19cf 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -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(); }