Fix channel handle URLs with tabs (#3241)

This commit is contained in:
absidue 2023-03-03 21:38:27 +01:00 committed by GitHub
parent d9e6a79757
commit 7eb148ba51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,7 +315,7 @@ const actions = {
let urlType = 'unknown'
const channelPattern =
/^\/(?:(?:channel|user|c)\/)?(?<channelId>[^/]+)(?:\/(join|featured|videos|playlists|about|community|channels))?\/?$/
/^\/(?:(?:channel|user|c)\/)?(?<channelId>[^/]+)(?:\/(?<tab>join|featured|videos|playlists|about|community|channels))?\/?$/
const typePatterns = new Map([
['playlist', /^(\/playlist\/?|\/embed(\/?videoseries)?)$/],
@ -420,7 +420,7 @@ const actions = {
}
let subPath = null
switch (url.pathname.split('/').filter(i => i)[2]) {
switch (match.groups.tab) {
case 'playlists':
subPath = 'playlists'
break