Skip to content

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

Merged
cjcolvar merged 1 commit into
mainfrom
first_impressions
Jun 12, 2024
Merged

Render time offsets for cues that begin exactly at 0#521
cjcolvar merged 1 commit into
mainfrom
first_impressions

Conversation

@cjcolvar

@cjcolvar cjcolvar commented Jun 12, 2024

Copy link
Copy Markdown
Member

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

@masaball masaball left a comment

Copy link
Copy Markdown
Contributor

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
@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