Skip to content

Commit d33adca

Browse files
committed
xo: Fix unicorn/prefer-logical-operator-over-ternary.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 8ea7f78 commit d33adca

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/common/translation-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ const appLocale = ConfigUtil.getConfigItem("appLanguage", "en");
1414

1515
/* If no locale present in the json, en is set default */
1616
export function __(phrase: string): string {
17-
return i18n.__({phrase, locale: appLocale ? appLocale : "en"});
17+
return i18n.__({phrase, locale: appLocale ?? "en"});
1818
}

tests/setup.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ function getAppDataDir() {
3434
base = path.join(process.env.HOME, "Library", "Application Support");
3535
break;
3636
case "linux":
37-
base = process.env.XDG_CONFIG_HOME
38-
? process.env.XDG_CONFIG_HOME
39-
: path.join(process.env.HOME, ".config");
37+
base =
38+
process.env.XDG_CONFIG_HOME ?? path.join(process.env.HOME, ".config");
4039
break;
4140
case "win32":
4241
base = process.env.APPDATA;

0 commit comments

Comments
 (0)