diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index d9ddf2f1c..278640372 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1498,15 +1498,15 @@ Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); if (Services.locale.getAppLocale) { - var appLocale = Services.locale.getAppLocale(); + var locale = Services.locale.getAppLocale(); } // Fx <=53 else { - var appLocale = Services.locale.getApplicationLocale(); + var locale = Services.locale.getApplicationLocale(); + locale = locale.getCategory('NSILOCALE_COLLATE'); } try { - var locale = appLocale.getCategory('NSILOCALE_COLLATE'); // Extract a valid language tag locale = locale.match(/^[a-z]{2}(\-[A-Z]{2})?/)[0]; var collator = new Intl.Collator(locale, { @@ -1516,7 +1516,7 @@ Components.utils.import("resource://gre/modules/Services.jsm"); }); } catch (e) { - Zotero.debug(e, 1); + Zotero.logError(e); // If there's an error, just skip sorting collator = {