Skip to content

Commit

Permalink
Merge pull request #900 from juhasch/fix/runtools2
Browse files Browse the repository at this point in the history
Make sure gutter is loaded before initializing it.
  • Loading branch information
juhasch authored Feb 22, 2017
2 parents e7c73f2 + 4282ec1 commit 882e7ad
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ define([
'jquery',
'require',
'base/js/events',
'codemirror/lib/codemirror',
'codemirror/addon/fold/foldgutter'
'codemirror/lib/codemirror'
], function(IPython, $, require, events, codemirror) {
"use strict";

Expand Down Expand Up @@ -566,10 +565,10 @@ define([
load_css('codemirror/addon/fold/foldgutter.css');
load_css( './gutter.css'); /* change default gutter width */
if (Jupyter.notebook !== undefined && Jupyter.notebook._fully_loaded) {
initGutter()
require(['codemirror/addon/fold/foldgutter'], initGutter)
} else {
events.on("notebook_loaded.Notebook", function () {
initGutter()
require(['codemirror/addon/fold/foldgutter'], initGutter)
})
}
};
Expand Down

0 comments on commit 882e7ad

Please sign in to comment.