fix: stop other repls on start
This commit is contained in:
parent
ed8f5bf24f
commit
e8e8f888dd
2 changed files with 29 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ export function MicroRepl({
|
|||
}
|
||||
|
||||
const editor = new StrudelMirror({
|
||||
id,
|
||||
defaultOutput: webaudioOutput,
|
||||
getTime: () => getAudioContext().currentTime,
|
||||
transpiler,
|
||||
|
|
@ -76,6 +77,9 @@ export function MicroRepl({
|
|||
init({ code, shouldDraw });
|
||||
});
|
||||
}
|
||||
return () => {
|
||||
editor.clear();
|
||||
};
|
||||
}, []);
|
||||
|
||||
if (!client) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue