We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98cd2f0 commit ae6334fCopy full SHA for ae6334f
src/theme/book.js
@@ -32,11 +32,15 @@ $( document ).ready(function() {
32
switch (e.keyCode) {
33
case KEY_CODES.NEXT_KEY:
34
e.preventDefault();
35
- window.location.href = $('.nav-chapters.next').attr('href');
+ if($('.nav-chapters.next').length) {
36
+ window.location.href = $('.nav-chapters.next').attr('href');
37
+ }
38
break;
39
case KEY_CODES.PREVIOUS_KEY:
40
- window.location.href = $('.nav-chapters.previous').attr('href');
41
+ if($('.nav-chapters.previous').length) {
42
+ window.location.href = $('.nav-chapters.previous').attr('href');
43
44
45
}
46
});
0 commit comments