From 6e39a707060676369f2e910f475d318be876d26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Mon, 4 May 2026 16:03:07 +0200 Subject: [PATCH] lint --- client/components/codeEditor/codeEditor.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/components/codeEditor/codeEditor.jsx b/client/components/codeEditor/codeEditor.jsx index 722301795..3b0ff5854 100644 --- a/client/components/codeEditor/codeEditor.jsx +++ b/client/components/codeEditor/codeEditor.jsx @@ -181,9 +181,9 @@ const CodeEditor = forwardRef( return page; }; - const getFoldRanges = (state) => { + const getFoldRanges = (state)=>{ const folds = []; - state.field(foldState, false)?.between(0, state.doc.length, (from, to) => { + state.field(foldState, false)?.between(0, state.doc.length, (from, to)=>{ folds.push({ from, to }); }); return folds; @@ -293,11 +293,11 @@ const CodeEditor = forwardRef( }; }, []); - const restoreFolds = (view, folds) => { - if (!folds?.length) return; + const restoreFolds = (view, folds)=>{ + if(!folds?.length) return; view.dispatch({ - effects: folds.map(f => foldEffect.of(f)) + effects : folds.map((f)=>foldEffect.of(f)) }); }; @@ -326,7 +326,7 @@ const CodeEditor = forwardRef( restoreFolds(view, foldsRef.current[tab]); const savedScroll = scrollRef.current[tab]; - + if(savedScroll != null) { requestAnimationFrame(()=>{ view.scrollDOM.scrollTop = savedScroll;