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