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 ee9eed5 commit 71254c3Copy full SHA for 71254c3
src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js
@@ -136,8 +136,10 @@
136
evt.preventDefault();
137
// Each time a link is clicked in the toc, save the current position and target in the history
138
var currentSection = $('#toc .highlight_on_scroll a').data('tocModifiedId')
139
- if (window.history.state.back != currentSection) {
140
- window.history.pushState({'back':currentSection},"",'')
+ if (window.history.state != null){
+ if (window.history.state.back != currentSection) {
141
+ window.history.pushState({'back':currentSection},"",'')
142
+ }
143
}
144
var trg_id = $(evt.currentTarget).attr('data-toc-modified-id');
145
window.history.pushState({'back':trg_id},"",'');
0 commit comments