mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-14 07:00:51 -04:00
fix(client): prevent non-serializable editor instance in save actions (#66625)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user