Merge pull request #7572 from mr-vinn/application-js-fix

Handle undefined text area values
This commit is contained in:
Dmitriy Zaporozhets 2014-10-28 15:23:45 +02:00
commit 2a16bbd626
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,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) ->