Here you are returning `false` actually... Probably is better to return `null` in the case of not having subject. What about
`return subject.isShowing ? dom.subject.value.replace(/\n\s*/g, ' ') : null`?
Please add a comment about what you are doing with the regular expression and why.