Skip to content

Commit

Permalink
Change test for minification
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Sep 19, 2023
1 parent 9bd26b4 commit 6d4e21b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/tracks/text-track.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ class TextTrack extends Track {
addCue(originalCue) {
let cue = originalCue;

if (cue.constructor && cue.constructor !== window.vttjs.VTTCue) {
// Testing if the cue is a VTTCue in a way that survives minification
if (!('getCueAsHTML' in cue)) {
cue = new window.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);

for (const prop in originalCue) {
Expand Down

0 comments on commit 6d4e21b

Please sign in to comment.