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
This commit is contained in:
Wadie 2025-02-03 23:30:49 +01:00 committed by Alex Rickabaugh
parent b592b1b051
commit 951155eb4c

View file

@ -87,6 +87,7 @@ export default class PlaygroundComponent implements AfterViewInit {
async changeTemplate(template: PlaygroundTemplate): Promise<void> {
this.selectedTemplate = template;
await this.loadTemplate(template.path);
await this.nodeRuntimeSandbox!.reset();
}
private async loadTemplate(tutorialPath: string) {