Commit 8ed7391c authored by Vinnie Okada's avatar Vinnie Okada

Handle undefined text area values

Check to see if a text area's `val` is defined before trying to call
`replace()` on it.
parent 230c52f7
......@@ -54,7 +54,7 @@ window.extractLast = (term) ->
return split( term ).pop()
window.rstrip = (val) ->
return val.replace(/\s+$/, '')
return if val then val.replace(/\s+$/, '') else val
# Disable button if text field is empty
window.disableButtonIfEmptyField = (field_selector, button_selector) ->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment