diff --git a/lib/main.js b/lib/main.js index 3e2437df5..79fa419ec 100644 --- a/lib/main.js +++ b/lib/main.js @@ -405,10 +405,6 @@ const Hydrogen = { restartKernelAndReEvaluateBubbles() { const { editor, kernel } = store; - if (!editor || !kernel) { - this.runAll(); - return; - } let breakpoints = []; _.forEach(this.markerBubbleMap, (bubble: ResultView) => { @@ -416,7 +412,11 @@ const Hydrogen = { }); this.clearResultBubbles(); - kernel.restart(() => this.runAll(breakpoints)); + if (!editor || !kernel) { + this.runAll(breakpoints); + } else { + kernel.restart(() => this.runAll(breakpoints)); + } }, toggleBubble() {