www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 3ff56a7d555627f26e196a4cde26cbb4a447c9c3
parent d7b75aaa80f494e58105d8b1b697f9a3d10f701d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 19 Mar 2014 06:00:05 -0400

Fix harmless "Not well-formed" console message from renamed-styles.json

Diffstat:
Mchrome/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 @@ -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(); }