From 9b1a5c3dc550804db38c57b0a7f649f92325c8f6 Mon Sep 17 00:00:00 2001 From: t9md Date: Wed, 21 Jun 2017 01:27:30 +0900 Subject: [PATCH] Respect empty bubble on initial run of `restart-kernel-and-re-evaluate-bubbles` command --- lib/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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() {