Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render time offsets for cues that begin exactly at 0 #521

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Jun 12, 2024

In Javascript 0 evaluates to false so a begin time of 0 skips rendering the time span by accident. I switched the guard to check that the typeof the begin time is a number.

0 && true // => 0
20 && true // => true
typeof 0 // => 'number'
typeof 0 === 'number' && true // => true

Resolves #500

Copy link
Contributor

@masaball masaball left a comment

Choose a reason for hiding this comment

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

👍

@cjcolvar cjcolvar merged commit 145c7c2 into main Jun 12, 2024
2 checks passed
@cjcolvar cjcolvar deleted the first_impressions branch June 12, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First VTT Cue Timestamp Doesn't Render Correctly in Transcript
2 participants