mirror of
https://github.com/younesaassila/ttv-lol-pro.git
synced 2025-05-24 02:22:13 +02:00
Fix #360
This commit is contained in:
parent
3536898e23
commit
2ce563b271
@ -4,8 +4,7 @@ export default function isChannelWhitelisted(
|
|||||||
channelName: string | null
|
channelName: string | null
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!channelName) return false;
|
if (!channelName) return false;
|
||||||
const whitelistedChannelsLower = store.state.whitelistedChannels.map(
|
return store.state.whitelistedChannels.some(
|
||||||
channel => channel.toLowerCase()
|
c => c.toLowerCase() === channelName.toLowerCase()
|
||||||
);
|
);
|
||||||
return whitelistedChannelsLower.includes(channelName.toLowerCase());
|
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,7 @@ export default function wasChannelSubscriber(
|
|||||||
channelName: string | null
|
channelName: string | null
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!channelName) return false;
|
if (!channelName) return false;
|
||||||
const activeChannelSubscriptionsLower =
|
return store.state.activeChannelSubscriptions.some(
|
||||||
store.state.activeChannelSubscriptions.map(channel =>
|
c => c.toLowerCase() === channelName.toLowerCase()
|
||||||
channel.toLowerCase()
|
|
||||||
);
|
);
|
||||||
return activeChannelSubscriptionsLower.includes(channelName.toLowerCase());
|
|
||||||
}
|
}
|
||||||
|
@ -651,11 +651,11 @@ function isChannelWhitelisted(
|
|||||||
pageState: PageState
|
pageState: PageState
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!channelName) return false;
|
if (!channelName) return false;
|
||||||
const whitelistedChannelsLower =
|
return (
|
||||||
pageState.state?.whitelistedChannels.map(channel =>
|
pageState.state?.whitelistedChannels.some(
|
||||||
channel.toLowerCase()
|
c => c.toLowerCase() === channelName.toLowerCase()
|
||||||
) ?? [];
|
) ?? false
|
||||||
return whitelistedChannelsLower.includes(channelName.toLowerCase());
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function wasChannelSubscriber(
|
function wasChannelSubscriber(
|
||||||
@ -663,11 +663,11 @@ function wasChannelSubscriber(
|
|||||||
pageState: PageState
|
pageState: PageState
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!channelName) return false;
|
if (!channelName) return false;
|
||||||
const activeChannelSubscriptionsLower =
|
return (
|
||||||
pageState.state?.activeChannelSubscriptions.map(channel =>
|
pageState.state?.activeChannelSubscriptions.some(
|
||||||
channel.toLowerCase()
|
c => c.toLowerCase() === channelName.toLowerCase()
|
||||||
) ?? [];
|
) ?? false
|
||||||
return activeChannelSubscriptionsLower.includes(channelName.toLowerCase());
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function flagRequest(
|
async function flagRequest(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user