Skip to content

Commit e1d52ea

Browse files
authored
#4358 - Get rid of the workaround of passing empty spaces
1 parent 6203130 commit e1d52ea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/projects/detail/components/PhaseCard/EditStageForm.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ class EditStageForm extends React.Component {
8686
if (publishClicked && phase.status === PHASE_STATUS_DRAFT) {
8787
newStatus = PHASE_STATUS_ACTIVE
8888
}
89+
if (!model.description.trim()) {
90+
delete model.description
91+
}
8992
const updateParam = _.assign({}, model, {
90-
description: model.description || ' ',
9193
startDate: updatedStartDate,
9294
endDate: updatedEndDate || '',
9395
status: newStatus
@@ -285,7 +287,7 @@ class EditStageForm extends React.Component {
285287
wrapperClass={`${styles['input-row']}`}
286288
label="Description"
287289
name="description"
288-
value={phase.description ? phase.description.trim() : ''}
290+
value={phase.description}
289291
maxLength={255}
290292
/>
291293
<label styleName="description-sub-label">255 character maximum</label>

0 commit comments

Comments
 (0)