diff options
author | Jack Davison <jack.davison@student.manchester.ac.uk> | 2016-09-09 18:36:48 +0100 |
---|---|---|
committer | Jack Davison <jack.davison@student.manchester.ac.uk> | 2016-10-26 14:22:53 +0100 |
commit | 728f1f71a53707606393c7887fe690dffb0d0916 (patch) | |
tree | 598821b50c933b795413df02e899ac0bd3139393 /app/assets/javascripts/issuable_form.js | |
parent | a66a3c7449f6d91f7f3bb1a86ac0e17623ba1fd6 (diff) | |
download | gitlab-ce-728f1f71a53707606393c7887fe690dffb0d0916.tar.gz |
Refactored less readable existance checks
CoffeeScript generated JavaScript contains some unreadable
expressions. This refactoring addresses complex uses of
the exestential operator that produced unreadable Javascript.
Diffstat (limited to 'app/assets/javascripts/issuable_form.js')
-rw-r--r-- | app/assets/javascripts/issuable_form.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/issuable_form.js b/app/assets/javascripts/issuable_form.js index b7f92ae9883..15cfa756425 100644 --- a/app/assets/javascripts/issuable_form.js +++ b/app/assets/javascripts/issuable_form.js @@ -44,8 +44,8 @@ }; IssuableForm.prototype.handleSubmit = function() { - var ref, ref1; - if (((ref = parseInt((ref1 = this.issueMoveField) != null ? ref1.val() : void 0)) != null ? ref : 0) > 0) { + var fieldId = (this.issueMoveField != null) ? this.issueMoveField.val() : null; + if ((parseInt(fieldId) || 0) > 0) { if (!confirm(this.issueMoveConfirmMsg)) { return false; } |