From 4e3b208e4aac5958fbda4c34d8c217f4017565f4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 22 Sep 2026 10:41:27 -0400 Subject: [PATCH] Don't log an error when no bibliography locale is set In the error console in https://forums.zotero.org/discussion/133857/ --- .../content/zotero/elements/styleConfigurator.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/elements/styleConfigurator.js b/chrome/content/zotero/elements/styleConfigurator.js index 8269453b67..79836f5806 100644 --- a/chrome/content/zotero/elements/styleConfigurator.js +++ b/chrome/content/zotero/elements/styleConfigurator.js @@ -135,13 +135,15 @@ } set value(val) { - try { - // eslint-disable-next-line no-new - new Intl.Locale(val); - } - catch (e) { - Zotero.logError(e); - val = ''; + if (val) { + try { + // eslint-disable-next-line no-new + new Intl.Locale(val); + } + catch (e) { + Zotero.logError(e); + val = ''; + } } val = Zotero.Styles.resolveLocale(val);