File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/jupyter_contrib_nbextensions/nbextensions/toc2 Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 529
529
return
530
530
}
531
531
532
+ // In a live notebook, read_config will have been called already, but
533
+ // in non-live notebooks, ensure that all config values are defined.
534
+ if ( ! liveNotebook ) {
535
+ cfg = $ . extend ( true , { } , default_cfg , cfg ) ;
536
+ }
537
+
532
538
var toc_wrapper = $ ( "#toc-wrapper" ) ;
533
539
if ( toc_wrapper . length === 0 ) { // toc window doesn't exist at all
534
540
create_toc_div ( cfg , st ) ; // create it
537
543
var ul = $ ( '<ul/>' ) . addClass ( 'toc-item' ) ;
538
544
539
545
// update sidebar/window title
540
- if ( typeof cfg . title_sidebar === 'undefined' ) { // For backwards compatibility:
541
- cfg . title_sidebar = "Contents" // May not be defined in some non-live notebooks
542
- } ;
543
546
$ ( '#toc-header > .header' ) . text ( cfg . title_sidebar + ' ' ) ;
544
547
545
548
// update toc element
You can’t perform that action at this time.
0 commit comments