1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-09-01 17:12:43 +02:00

Adding more tests to webslides

This commit is contained in:
Antonio Laguna
2017-06-17 16:23:12 +02:00
parent fedad97769
commit 05db02495c
2 changed files with 377 additions and 53 deletions

View File

@@ -358,7 +358,7 @@ export default class WebSlides {
* @private
*/
isValidIndexSlide_(i) {
return i >= 0 && i < this.maxSlide_;
return typeof i === 'number' && i >= 0 && i < this.maxSlide_;
}
/**
@@ -379,6 +379,7 @@ export default class WebSlides {
// Keeping the order
if (slideNumber !== 0) {
let i = 0;
while(i < slideNumber) {
this.slides[i].moveAfterLast();
i++;