Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Davison <jack.davison@student.manchester.ac.uk>2016-09-09 20:36:48 +0300
committerJack Davison <jack.davison@student.manchester.ac.uk>2016-10-26 16:22:53 +0300
commit728f1f71a53707606393c7887fe690dffb0d0916 (patch)
tree598821b50c933b795413df02e899ac0bd3139393 /app/assets/javascripts/issuable_form.js
parenta66a3c7449f6d91f7f3bb1a86ac0e17623ba1fd6 (diff)
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.js4
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;
}