This issue reproed only if the first slide has count: false - we have a unit test that was passing when the count:false is not on the first slide. However, adding count: false to the first slide, fails the test.
Let's assume we have the following slides:
count:false
Slide A
---
Slide B
When we parse the slides we check if the slide is included (based on the classes) and if it's not a layout slide as well as if it should be counted. The code inside the if statement does not execute, so the slides.byNumber[slideNumber] is undefined
This issue reproed only if the first slide has
count: false
- we have a unit test that was passing when thecount:false
is not on the first slide. However, addingcount: false
to the first slide, fails the test.Let's assume we have the following slides:
When we parse the slides we check if the slide is included (based on the classes) and if it's not a layout slide as well as if it should be counted. The code inside the if statement does not execute, so the slides.byNumber[slideNumber] is undefined
Later though, we call slides.byNumber[slideNumber].push(slideViewModel); and that's what's causing the issue.
This fix adds a check for undefined on
slides.byNumber[slideNumber]
before calling .push on it.Resolves #613