summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/single_file_diff.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/single_file_diff.js')
-rw-r--r--app/assets/javascripts/single_file_diff.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/app/assets/javascripts/single_file_diff.js b/app/assets/javascripts/single_file_diff.js
index f751df6367e..192eb0784d4 100644
--- a/app/assets/javascripts/single_file_diff.js
+++ b/app/assets/javascripts/single_file_diff.js
@@ -29,22 +29,17 @@ export default class SingleFileDiff {
this.isOpen = !this.diffForPath;
if (this.diffForPath) {
this.collapsedContent = this.content;
- this.loadingContent = $(WRAPPER)
- .addClass('loading')
- .html(LOADING_HTML)
- .hide();
+ this.loadingContent = $(WRAPPER).addClass('loading').html(LOADING_HTML).hide();
this.content = null;
this.collapsedContent.after(this.loadingContent);
this.$chevronRightIcon.removeClass('gl-display-none');
} else {
- this.collapsedContent = $(WRAPPER)
- .html(COLLAPSED_HTML)
- .hide();
+ this.collapsedContent = $(WRAPPER).html(COLLAPSED_HTML).hide();
this.content.after(this.collapsedContent);
this.$chevronDownIcon.removeClass('gl-display-none');
}
- $('.js-file-title, .click-to-expand', this.file).on('click', e => {
+ $('.js-file-title, .click-to-expand', this.file).on('click', (e) => {
this.toggleDiff($(e.target));
});
}