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 f0b99c7 commit 114d3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webvtt.go
Expand Up @@ -339,7 +339,7 @@ func (s Subtitles) WriteToWebVTT(o io.Writer) (err error) {
c = append(c, bytesLineSeparator...)
}
//Add Style
if s.Styles != nil || len(s.Styles) != 0 {
if s.Styles != nil && len(s.Styles) != 0 {
c = append(c, []byte("STYLE")...)
c = append(c, bytesLineSeparator...)
}
Expand Down

0 comments on commit 114d3ae

Please sign in to comment.