null check progress DOM element even if it's configured to be on

This commit is contained in:
Hakim El Hattab committed 2012-07-20 22:09:56 -04:00
1 parent 7b53ff0b9d
commit 7f9662edab
2 files changed
+3 -2

No files matched your search

+2 -2
View File
@@ -155,7 +155,7 @@ var Reveal = (function(){
dom.controls.style.display = 'block';
}
if( config.progress ) {
if( config.progress && dom.progress ) {
dom.progress.style.display = 'block';
}
@@ -680,7 +680,7 @@ var Reveal = (function(){
}
// Update progress if enabled
if( config.progress ) {
if( config.progress && dom.progress ) {
dom.progressbar.style.width = ( indexh / ( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length - 1 ) ) * window.innerWidth + 'px';
}