Skip to content
Snippets Groups Projects
Commit 8ed7391c authored by Vinnie Okada's avatar Vinnie Okada
Browse files

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
No related branches found
No related tags found
Loading
Loading
Loading
@@ -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) ->
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment