From 951155eb4c2cf5a3d13aa9b290f4eac094c52cef Mon Sep 17 00:00:00 2001 From: Wadie <1206307+wadie@users.noreply.github.com> Date: Mon, 3 Feb 2025 23:30:49 +0100 Subject: [PATCH] fix(docs-infra): reset sandbox runtime on template change (#59844) Ensure the sandbox runtime is properly reset when the template changes to prevent any unexpected behavior during development. PR Close #59844 --- adev/src/app/features/playground/playground.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/adev/src/app/features/playground/playground.component.ts b/adev/src/app/features/playground/playground.component.ts index 00cf9ae474d..b5b3234c9db 100644 --- a/adev/src/app/features/playground/playground.component.ts +++ b/adev/src/app/features/playground/playground.component.ts @@ -87,6 +87,7 @@ export default class PlaygroundComponent implements AfterViewInit { async changeTemplate(template: PlaygroundTemplate): Promise { this.selectedTemplate = template; await this.loadTemplate(template.path); + await this.nodeRuntimeSandbox!.reset(); } private async loadTemplate(tutorialPath: string) {