Update dependency typescript to v5.5.2 (#12688)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8c3cc6159e
commit
4bf8766885
11 changed files with 45 additions and 31 deletions
|
@ -263,13 +263,19 @@ export default class SettingsStore {
|
|||
public static getDisplayName(settingName: string, atLevel = SettingLevel.DEFAULT): string | null {
|
||||
if (!SETTINGS[settingName] || !SETTINGS[settingName].displayName) return null;
|
||||
|
||||
let displayName = SETTINGS[settingName].displayName;
|
||||
if (displayName instanceof Object) {
|
||||
if (displayName[atLevel]) displayName = displayName[atLevel];
|
||||
else displayName = displayName["default"];
|
||||
const displayName = SETTINGS[settingName].displayName;
|
||||
|
||||
if (typeof displayName === "string") {
|
||||
return _t(displayName);
|
||||
}
|
||||
if (displayName?.[atLevel]) {
|
||||
return _t(displayName[atLevel]);
|
||||
}
|
||||
if (displayName?.["default"]) {
|
||||
return _t(displayName["default"]);
|
||||
}
|
||||
|
||||
return displayName ? _t(displayName) : null;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue