From 6459824fb02e78a668ef6a69693e6bc288d89972 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 6 Apr 2021 10:44:32 +0200 Subject: [PATCH] fix(shell-evaluator): only apply async-rewriter2 runtime support once `hasAppliedAsyncWriterRuntimeSupport` was supposed to be a run-only guard, it was just the actual setting of the variable that was missing so far. This fix makes the shell respond a lot faster when using the new async rewriter. :) --- packages/shell-evaluator/src/shell-evaluator.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/shell-evaluator/src/shell-evaluator.ts b/packages/shell-evaluator/src/shell-evaluator.ts index 7fb16738be..986b3b80a4 100644 --- a/packages/shell-evaluator/src/shell-evaluator.ts +++ b/packages/shell-evaluator/src/shell-evaluator.ts @@ -65,6 +65,7 @@ class ShellEvaluator { } if (!this.hasAppliedAsyncWriterRuntimeSupport) { + this.hasAppliedAsyncWriterRuntimeSupport = true; const supportCode = (this.internalState.asyncWriter as any).runtimeSupportCode(); // Eval twice: We need the modified prototypes to be present in both // the evaluation context and the current one, because e.g. the value of