Don't log an error when no bibliography locale is set

In the error console in https://forums.zotero.org/discussion/133857/

(cherry picked from commit 4e3b208e4a)
This commit is contained in:
Dan Stillman 2026-09-22 10:41:27 -04:00
parent 9a2d0219f2
commit 1265d79825

View file

@ -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);