fix: allow users to submit after editing (#46939)
If a user runs the tests and they pass, the multifile editor will show a submit button. If the user then edited the page, it would no longer be possible to submit. This ensures the redux store keeps the original, passing, tests and lets the user submitpull/46942/head
parent
9421aa6041
commit
0e8113b4af
|
@ -1084,7 +1084,10 @@ const Editor = (props: EditorProps): JSX.Element => {
|
|||
focusIfTargetEditor();
|
||||
}
|
||||
|
||||
if (props.initialTests) initTests(props.initialTests);
|
||||
// Once a challenge has been completed, we don't want changes to the content
|
||||
// to reset the tests since the user is already done with the challenge.
|
||||
if (props.initialTests && !challengeIsComplete())
|
||||
initTests(props.initialTests);
|
||||
|
||||
if (hasEditableRegion() && editor) {
|
||||
if (props.isResetting) {
|
||||
|
|
Loading…
Reference in New Issue