Skip to content

Commit

Permalink
fix(useMediaControls): Removes tracks that have been inserted in html (
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 committed May 11, 2021
1 parent 6b200f0 commit 941ac53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useMediaControls/index.ts
Expand Up @@ -384,7 +384,7 @@ export function useMediaControls(target: MaybeRef<HTMLMediaElement | null | unde
const textTracks = unref(options.tracks)
const el = unref(target)

if (!textTracks || !el)
if (!textTracks || !textTracks.length || !el)
return

/**
Expand Down

0 comments on commit 941ac53

Please sign in to comment.