Skip to content

Commit

Permalink
FIX: WatchSideBar correctly generates content for simulcast link
Browse files Browse the repository at this point in the history
The current code added in PR #792 uses the fact that `decodeLayout`
generates layout item's content indexes based on the item's own
index, but this behavior should not be relied upon.

Relates to #584
  • Loading branch information
meiamsome committed Dec 29, 2024
1 parent b821585 commit d455c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/watch/WatchSideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default {
// Fill in blank spaces in the layout with the simulcast videos in order.
// This is for the case where the default layout already has chat boxes specified in content.
const filledContents = layout.map((_, i) => content[i] ?? allSimulcastVideos.shift());
const filledContents = Object.fromEntries(layout.map(({ i }) => [i, content[i] ?? allSimulcastVideos.shift()]));
if (allSimulcastVideos.length) {
console.warn(`Expected all videos to be placeable in default, but ${allSimulcastVideos.length} were not able to be placed.`);
Expand Down

0 comments on commit d455c9c

Please sign in to comment.