fix: cleanup
This commit is contained in:
parent
23f6ff9bc4
commit
04dcbda9a3
2 changed files with 5 additions and 11 deletions
|
|
@ -412,10 +412,6 @@ export class StrudelMirror {
|
||||||
setAutocompletionEnabled(enabled) {
|
setAutocompletionEnabled(enabled) {
|
||||||
this.reconfigureExtension('isAutoCompletionEnabled', enabled);
|
this.reconfigureExtension('isAutoCompletionEnabled', enabled);
|
||||||
}
|
}
|
||||||
updatePrebake(prebake) {
|
|
||||||
logger('[repl] prebake updated');
|
|
||||||
this.prebaked = prebake();
|
|
||||||
}
|
|
||||||
updateSettings(settings) {
|
updateSettings(settings) {
|
||||||
this.setFontSize(settings.fontSize);
|
this.setFontSize(settings.fontSize);
|
||||||
this.setFontFamily(settings.fontFamily);
|
this.setFontFamily(settings.fontFamily);
|
||||||
|
|
|
||||||
|
|
@ -184,13 +184,11 @@ export function useReplContext() {
|
||||||
}, [_settings]);
|
}, [_settings]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const prebake = async () =>
|
Promise.all([modulesLoading, presets]).then(() => {
|
||||||
Promise.all([modulesLoading, presets]).then(() => {
|
if (prebakeScript?.length) {
|
||||||
if (prebakeScript?.length) {
|
return evaluateUserPrebake(prebakeScript ?? '');
|
||||||
return evaluateUserPrebake(prebakeScript ?? '');
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
editorRef.current?.updatePrebake(prebake);
|
|
||||||
}, [prebakeScript]);
|
}, [prebakeScript]);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue