diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-28 15:23:45 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-28 15:23:45 +0200 |
| commit | 2a16bbd626fb95637e7da4103dc4e25f56ea3e1d (patch) | |
| tree | 51c5b100d3124913a96ab12a908a813ce751f403 | |
| parent | ec4a079099ca3b9192aa379567051a496d315575 (diff) | |
| parent | 8ed7391cb03ebf47efeb5ce5379eb667a3f22676 (diff) | |
| download | gitlab-ce-2a16bbd626fb95637e7da4103dc4e25f56ea3e1d.tar.gz | |
Merge pull request #7572 from mr-vinn/application-js-fix
Handle undefined text area values
| -rw-r--r-- | app/assets/javascripts/application.js.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index ff0d0bb32b9..2cc8d1a00ac 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -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) -> |
