Skip to content

Commit

Permalink
bugfix/define subtitles on audio registration
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-leezard committed Nov 7, 2023
1 parent 96cd92b commit 8383035
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-humans-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-audio-tracks": patch
---

bugfix/define subtitles on audio registration
4 changes: 2 additions & 2 deletions src/Track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ class Track {
const _keyForSubtitles = keyForSubtitles ?? originalFilename ?? filename
const _subtitles =
subtitles ??
Object.prototype.hasOwnProperty.call(
(Object.prototype.hasOwnProperty.call(
this.#subtitlesJSON,
_keyForSubtitles
)
? this.#subtitlesJSON[_keyForSubtitles]!
: []
: [])
const audioItem = new AudioItem({
debug: this.debug,
innerAudio: audio,
Expand Down

1 comment on commit 8383035

@vercel
Copy link

@vercel vercel bot commented on 8383035 Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.