diff --git a/src/sql/parts/notebook/models/cell.ts b/src/sql/parts/notebook/models/cell.ts index b0a3da64dd..75d60f4e59 100644 --- a/src/sql/parts/notebook/models/cell.ts +++ b/src/sql/parts/notebook/models/cell.ts @@ -212,12 +212,12 @@ export class CellModel implements ICellModel { // TODO update source based on editor component contents let content = this.source; if (content) { - this.fireExecutionStateChanged(); let future = await kernel.requestExecute({ code: content, stop_on_error: true }, false); this.setFuture(future as FutureInternal); + this.fireExecutionStateChanged(); // For now, await future completion. Later we should just track and handle cancellation based on model notifications let result: nb.IExecuteReplyMsg = await future.done; if (result && result.content) {