Skip to content

Commit

Permalink
nil check for style on webvtt
Browse files Browse the repository at this point in the history
  • Loading branch information
Avishek-Gulshan committed Jul 22, 2021
1 parent 114d3ae commit b86cb77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webvtt.go
Expand Up @@ -465,7 +465,7 @@ func (s Subtitles) WriteToWebVTT(o io.Writer) (err error) {
c = append(c, []byte(webVTTCueEnd)...)
c = append(c, bytesLineSeparator...)
}
if s.Styles != nil {
if s.Styles != nil && len(s.Styles) != 0 {
c = append(c, bytesLineSeparator...)
}

Expand Down

0 comments on commit b86cb77

Please sign in to comment.