Skip to content

Commit

Permalink
refactor: use null coalescing instead of OR
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless committed May 20, 2021
1 parent ccfc15e commit bf26679
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export const getCurrentLocale = createSelector(
defaultLocale,
getServerConfigParameter<string>('general.defaultLocale'),
(available, requested, internalDefaultLocale, configuredDefault) =>
available?.find(l => l.lang === requested) ||
available?.find(l => l.lang === configuredDefault) ||
available?.find(l => l.lang === internalDefaultLocale) ||
available?.find(l => l.lang === requested) ??
available?.find(l => l.lang === configuredDefault) ??
available?.find(l => l.lang === internalDefaultLocale) ??
available?.[0]
);

Expand Down

1 comment on commit bf26679

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure Demo Servers are available:

Please sign in to comment.