mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Fixes selecting a profile leads to webui crash.
This commit is contained in:
parent
1ab04e31a4
commit
363a1a8080
1 changed files with 6 additions and 3 deletions
|
|
@ -118,9 +118,12 @@ export default function TVChannelGuide({ startDate, endDate }) {
|
|||
if (selectedProfileId !== 'all') {
|
||||
// Get the profile's enabled channels
|
||||
const profileChannels = profiles[selectedProfileId]?.channels || [];
|
||||
const enabledChannelIds = profileChannels
|
||||
.filter((pc) => pc.enabled)
|
||||
.map((pc) => pc.id);
|
||||
// Check if channels is a Set (from the error message, it likely is)
|
||||
const enabledChannelIds = Array.isArray(profileChannels)
|
||||
? profileChannels.filter((pc) => pc.enabled).map((pc) => pc.id)
|
||||
: profiles[selectedProfileId]?.channels instanceof Set
|
||||
? Array.from(profiles[selectedProfileId].channels)
|
||||
: [];
|
||||
|
||||
result = result.filter((channel) =>
|
||||
enabledChannelIds.includes(channel.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue