From 7eb148ba5121dde08d8519110fa057e3a32767bc Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Fri, 3 Mar 2023 21:38:27 +0100 Subject: [PATCH] Fix channel handle URLs with tabs (#3241) --- src/renderer/store/modules/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 97e062b4e..61b8cd516 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -315,7 +315,7 @@ const actions = { let urlType = 'unknown' const channelPattern = - /^\/(?:(?:channel|user|c)\/)?(?[^/]+)(?:\/(join|featured|videos|playlists|about|community|channels))?\/?$/ + /^\/(?:(?:channel|user|c)\/)?(?[^/]+)(?:\/(?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