Skip to content

Commit 7f9662e

Browse files
committed
null check progress DOM element even if it's configured to be on
1 parent 7b53ff0 commit 7f9662e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ You can change the appearance of the speaker notes by editing the file at `plugi
176176
- Added beige theme
177177
- Added 'autoSlide' config
178178
- Bug fix: The 'slidechanged' event is now firing upon 'hashchange'. Thanks [basecode](https://github.com/basecode)
179+
- Bug fix: JS error when the 'progress' option was true but there was no progress DOM element
179180

180181
#### 1.3
181182
- Revised keyboard shortcuts, including ESC for overview, N for next, P for previous. Thanks [mahemoff](https://github.com/mahemoff)

js/reveal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ var Reveal = (function(){
155155
dom.controls.style.display = 'block';
156156
}
157157

158-
if( config.progress ) {
158+
if( config.progress && dom.progress ) {
159159
dom.progress.style.display = 'block';
160160
}
161161

@@ -680,7 +680,7 @@ var Reveal = (function(){
680680
}
681681

682682
// Update progress if enabled
683-
if( config.progress ) {
683+
if( config.progress && dom.progress ) {
684684
dom.progressbar.style.width = ( indexh / ( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length - 1 ) ) * window.innerWidth + 'px';
685685
}
686686

0 commit comments

Comments
 (0)