mirror of
https://github.com/maaslalani/slides.git
synced 2026-01-10 06:48:01 -05:00
Ensure slides has at least some content to prevent crashing
This commit is contained in:
@@ -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:]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user