fx-compat: Fix error when switching language to Automatic

Services.locale always wants an array now, but it can be empty.

We still get "Uncaught (in promise) undefined" printed to the console, no stack,
not caught by "Pause on exceptions" in the debugger... but it's not clear that
that's actually coming from this code, and it doesn't seem to prevent anything
from working.
This commit is contained in:
Abe Jellinek 2022-11-22 20:53:13 -05:00
parent f98ab3b0a6
commit 16eac5040b

View file

@ -102,7 +102,7 @@ Zotero_Preferences.General = {
var changed = requestedLocale
&& requestedLocale == Zotero.locale
&& menu.label != this._getAutomaticLocaleMenuLabel();
Services.locale.requestedLocales = null;
Services.locale.requestedLocales = [];
}
else {
// Changed if moving to a locale other than the current one