Skip to content

Commit dff9936

Browse files
author
vikasrohit
authored
Merge pull request #878 from appirio-tech/feature/white-space-in-notes
Github issue#405, White spaces are recognized as valid input for NOTES
2 parents 56c98de + 03a1815 commit dff9936

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/projects/detail/components/ProjectSpecSidebar.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ const calcProgress = (project, subSection) => {
3434
return [validScreens.length, screens.length]//TODO we should do range comparison here
3535
} else {
3636
// assuming there is only one question
37-
return [_.isEmpty(_.get(project, subSection.fieldName, null)) ? 0 : 1, 1]
37+
let val = _.get(project, subSection.fieldName, null)
38+
if (val && typeof val.trim === 'function') {
39+
val = val.trim()
40+
}
41+
return [_.isEmpty(val) ? 0 : 1, 1]
3842
}
3943
}
4044

0 commit comments

Comments
 (0)