hotfix: update button behavior
This commit is contained in:
parent
4871abbd71
commit
9a07b15952
1 changed files with 3 additions and 2 deletions
|
|
@ -130,11 +130,12 @@ export function Repl({ embedded = false }) {
|
||||||
editorRef.current.repl.setCps(1);
|
editorRef.current.repl.setCps(1);
|
||||||
await prebake(); // declare default samples
|
await prebake(); // declare default samples
|
||||||
}
|
}
|
||||||
if (newCode || isDirty) {
|
if (newCode && isDirty) {
|
||||||
editorRef.current.setCode(newCode);
|
editorRef.current.setCode(newCode);
|
||||||
editorRef.current.repl.evaluate(newCode);
|
editorRef.current.repl.evaluate(newCode);
|
||||||
|
} else if (isDirty) {
|
||||||
|
editorRef.current.evaluate();
|
||||||
}
|
}
|
||||||
logger('[repl] code updated!');
|
|
||||||
};
|
};
|
||||||
const handleShuffle = async () => {
|
const handleShuffle = async () => {
|
||||||
// window.postMessage('strudel-shuffle');
|
// window.postMessage('strudel-shuffle');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue