Skip to content

Commit

Permalink
fix: 객관식 제출안되던 현상 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph0926 committed Aug 27, 2024
1 parent cb9748b commit cfa7ce6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/src/components/Survey/create-survey-page3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ export const CreateSurveyPageStep3 = () => {
toast.error('질문을 입력해주세요.');
return;
}

if (
questions.filter(
q =>
q.type !== 'SUBJECTIVE' && q.options.map(c => c.trim().length === 0)
).length > 0
questions.map(q =>
q.type !== 'SUBJECTIVE'
? q.options.filter(c => c.trim().length === 0).length
: null
)[1] !== 0
) {
toast.error('객관식 항목은 빈 값일 수 없습니다.');
return;
Expand Down

0 comments on commit cfa7ce6

Please sign in to comment.