From 6ecf94826bae2700719c84ff01bd37e7d6aa3110 Mon Sep 17 00:00:00 2001 From: UK <41271523+NeloBlivion@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:11:46 +0000 Subject: [PATCH] simplified check --- src/views/AddChannelRequest.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/AddChannelRequest.vue b/src/views/AddChannelRequest.vue index 5e5d13417..3c00fa3a8 100644 --- a/src/views/AddChannelRequest.vue +++ b/src/views/AddChannelRequest.vue @@ -243,7 +243,7 @@ export default { return ( (cid && !cid[0].includes("/c/") - && (cid[1].length > 12 || cid[0].endsWith('@')) + && (cid[1].length > 12 || cid[0].includes('@')) && cid[0].startsWith("ht")) || this.$t("channelRequest.ChannelURLErrorFeedback") ); @@ -270,7 +270,7 @@ export default { const regex = /(?:https?:\/\/)(?:www\.)?youtu(?:be\.com\/)(?:channel\/|@)([\w\-_]*)/gi; const matches = [...this.link.matchAll(regex)]; let id = matches?.[0]?.[1]; - handle = matches[0][0].endsWith('@') + handle = this.link.includes('@') id = handle ? '@' + id : id; try {