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 {
52
52
readOnly = { readOnly }
53
53
/>
54
54
</ div > ) }
55
- { challenge . submitTriggered && ! challenge . description && (
55
+ { challenge . submitTriggered && ( challenge . description || '' ) . trim ( ) . length === 0 && (
56
56
< div className = { styles . error } > Public Specification is required</ div >
57
57
) }
58
58
{ ! 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 {
673
673
const value = challenge [ key ]
674
674
675
675
// 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 )
677
680
} )
678
681
679
682
return ! ( isRequiredMissing || _ . isEmpty ( this . state . currentTemplate ) )
You can’t perform that action at this time.
0 commit comments