Ensure slides has at least some content to prevent crashing

This commit is contained in:
Maas Lalani
2021-07-01 20:38:47 -04:00
parent 65c13a5feb
commit a86cf85712

View File

@@ -74,7 +74,7 @@ func (m *Model) Load() error {
metaData, exists := meta.New().ParseHeader(slides[0])
// If the user specifies a custom configuration options
// skip the first "slide" since this is all configuration
if exists {
if exists && len(slides) > 1 {
slides = slides[1:]
}