File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/components/ChallengeEditor Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class TextEditorField extends Component {
5252 readOnly = { readOnly }
5353 />
5454 </ div > ) }
55- { challenge . submitTriggered && ! challenge . description && (
55+ { challenge . submitTriggered && ( challenge . description || '' ) . trim ( ) . length === 0 && (
5656 < div className = { styles . error } > Public Specification is required</ div >
5757 ) }
5858 { ! readOnly && shouldShowPrivateDescription && ! showShowPrivateDescriptionField && ( < div className = { styles . button } onClick = { this . addNewPrivateDescription } >
Original file line number Diff line number Diff line change @@ -673,7 +673,10 @@ class ChallengeEditor extends Component {
673673 const value = challenge [ key ]
674674
675675 // this check works for string and array values
676- isRequiredMissing = isRequiredMissing || ! value || ! value . length
676+ isRequiredMissing = isRequiredMissing ||
677+ ! value ||
678+ ( _ . isString ( value ) && value . trim ( ) . length === 0 ) ||
679+ ( _ . isArray ( value ) && value . length === 0 )
677680 } )
678681
679682 return ! ( isRequiredMissing || _ . isEmpty ( this . state . currentTemplate ) )
You can’t perform that action at this time.
0 commit comments