mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 14:26:58 -04:00
only eval if script
This commit is contained in:
@@ -47,7 +47,6 @@ if (typeof window !== 'undefined') {
|
||||
multiChannelOrbits: parseBoolean(multiChannelOrbits),
|
||||
});
|
||||
modulesLoading = loadModules();
|
||||
// prebakeScript = evaluate(settingsMap.get().prebakeScript ?? '')
|
||||
presets = prebake();
|
||||
drawContext = getDrawContext();
|
||||
clearCanvas = () => drawContext.clearRect(0, 0, drawContext.canvas.height, drawContext.canvas.width);
|
||||
@@ -86,7 +85,9 @@ export function useReplContext() {
|
||||
drawContext,
|
||||
prebake: async () =>
|
||||
Promise.all([modulesLoading, presets]).then(() => {
|
||||
return evaluate(prebakeScript ?? '');
|
||||
if (prebakeScript?.length) {
|
||||
return evaluate(prebakeScript ?? '');
|
||||
}
|
||||
}),
|
||||
onUpdateState: (state) => {
|
||||
setReplState({ ...state });
|
||||
|
||||
Reference in New Issue
Block a user