Skip to content

Commit

Permalink
Fix access of media src value with non-source children (#6611)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonatangcavalcanti committed Aug 5, 2024
1 parent cedf96d commit 0d29c78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,7 @@ export default class BufferController implements ComponentAPI {
};

private get mediaSrc(): string | undefined {
const media =
(this.media?.firstChild as HTMLSourceElement | null) || this.media;
const media = this.media?.querySelector?.('source') || this.media;
return media?.src;
}

Expand Down

0 comments on commit 0d29c78

Please sign in to comment.