mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Update dependencies
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -38,5 +38,5 @@ const userRoleRights: { [ id in UserRole ]: UserRight[] } = {
|
||||
export function hasUserRight (userRole: UserRole, userRight: UserRight) {
|
||||
const userRights = userRoleRights[userRole]
|
||||
|
||||
return userRights.indexOf(UserRight.ALL) !== -1 || userRights.indexOf(userRight) !== -1
|
||||
return userRights.includes(UserRight.ALL) || userRights.includes(userRight)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user