mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Handle undefined text area values
Check to see if a text area's `val` is defined before trying to call `replace()` on it.
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user