From bdd428a6d9138d751f8cde82867022a93f1a76cc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 Feb 2020 16:03:39 +0100 Subject: Update dependencies --- shared/models/i18n/i18n.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared/models/i18n/i18n.ts') diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 36688382d..27b911b75 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts @@ -69,11 +69,11 @@ export function peertubeTranslate (str: string, translations?: { [ id: string ]: const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) export function is18nPath (path: string) { - return possiblePaths.indexOf(path) !== -1 + return possiblePaths.includes(path) } export function is18nLocale (locale: string) { - return POSSIBLE_LOCALES.indexOf(locale) !== -1 + return POSSIBLE_LOCALES.includes(locale) } export function getCompleteLocale (locale: string) { @@ -85,7 +85,7 @@ export function getCompleteLocale (locale: string) { } export function getShortLocale (locale: string) { - if (locale.indexOf('-') === -1) return locale + if (locale.includes('-') === false) return locale return locale.split('-')[0] } -- cgit v1.2.3