Skip to content

Commit

Permalink
Merge pull request #6327 from mozilla/bitecs-media-link-fix
Browse files Browse the repository at this point in the history
Remove MediaLink when MediaLoader is removed
  • Loading branch information
keianhzo authored Oct 13, 2023
2 parents 52de272 + 34c7f46 commit 3e139db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bit-systems/media-loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function* loadAndAnimateMedia(world: HubsWorld, eid: EntityID, clearRollbacks: C
yield* animateScale(world, media);
}
removeComponent(world, MediaLoader, eid);
removeComponent(world, MediaLink, eid);

if (media) {
if (hasComponent(world, MediaLoaded, media)) {
Expand Down

0 comments on commit 3e139db

Please sign in to comment.