From 921097b321cc83e7d83b5d0d75469d5e6ecba1cd Mon Sep 17 00:00:00 2001 From: Ragini Pandey <99394366+ragini-pandey@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:46:47 +0530 Subject: [PATCH] fix(client): prevent non-serializable editor instance in save actions (#66625) --- client/src/templates/Challenges/classic/editor.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/templates/Challenges/classic/editor.tsx b/client/src/templates/Challenges/classic/editor.tsx index 70d804bf139..2cd24501474 100644 --- a/client/src/templates/Challenges/classic/editor.tsx +++ b/client/src/templates/Challenges/classic/editor.tsx @@ -655,12 +655,12 @@ const Editor = (props: EditorProps): JSX.Element => { monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, monaco.KeyMod.WinCtrl | monaco.KeyCode.KeyS ], - run: + run: () => props.saveSubmissionToDB && props.isSignedIn ? // save to database - props.saveChallenge + props.saveChallenge() : // save to local storage - props.saveEditorContent + props.saveEditorContent() }); editor.addAction({ id: 'toggle-accessibility',