Shower::prev: added prevSteps check

This commit is contained in:
miripiruni 2013-05-03 20:33:10 +04:00
parent 51796e477b
commit e5470620f8
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ window.shower = window.shower || (function(window, document, undefined) {
prevSteps = document.getElementById(slide.id).querySelectorAll('.next.active');
if ( ! prevSteps || prevSteps.length < 1) {
return false;
}
if (slide.innerComplete > 0) {
slide.innerComplete--;
prevSteps[prevSteps.length - 1].classList.remove('active');