cleanup: Use logical assignments

gjs updated mozjs to a version that support assignment operators
for logical operators, so use those where appropriate.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2115>
This commit is contained in:
Florian Müllner
2022-01-18 21:02:04 +01:00
committed by Marge Bot
parent 1fe79a331f
commit b54111ef88
8 changed files with 11 additions and 11 deletions

View File

@ -104,7 +104,7 @@ function initTranslations(domain) {
if (!extension)
throw new Error('initTranslations() can only be called from extensions');
domain = domain || extension.metadata['gettext-domain'];
domain ||= extension.metadata['gettext-domain'];
// Expect USER extensions to have a locale/ subfolder, otherwise assume a
// SYSTEM extension that has been installed in the same prefix as the shell
@ -188,7 +188,7 @@ function getSettings(schema) {
if (!extension)
throw new Error('getSettings() can only be called from extensions');
schema = schema || extension.metadata['settings-schema'];
schema ||= extension.metadata['settings-schema'];
const GioSSS = Gio.SettingsSchemaSource;