Shower::prev: added prevSteps check
This commit is contained in:
parent
51796e477b
commit
e5470620f8
|
@ -107,6 +107,10 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
|
|
||||||
prevSteps = document.getElementById(slide.id).querySelectorAll('.next.active');
|
prevSteps = document.getElementById(slide.id).querySelectorAll('.next.active');
|
||||||
|
|
||||||
|
if ( ! prevSteps || prevSteps.length < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (slide.innerComplete > 0) {
|
if (slide.innerComplete > 0) {
|
||||||
slide.innerComplete--;
|
slide.innerComplete--;
|
||||||
prevSteps[prevSteps.length - 1].classList.remove('active');
|
prevSteps[prevSteps.length - 1].classList.remove('active');
|
||||||
|
|
Loading…
Reference in New Issue