summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-04-27 12:22:16 -0500
committerDouwe Maan <douwe@selenight.nl>2017-04-27 12:23:27 -0500
commitb6566277be7ef91cd998f48a229e1e95d01397f3 (patch)
tree73022d7104452b384b82ad9a66ec1409c1dcf792 /app/assets
parent6287e2825c7efad95d1eab65cdec6818c9df829a (diff)
downloadgitlab-ce-b6566277be7ef91cd998f48a229e1e95d01397f3.tar.gz
Add variable to save us a double lookup
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/line_highlighter.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js
index 5ffa6283a03..a6f7bea99f5 100644
--- a/app/assets/javascripts/line_highlighter.js
+++ b/app/assets/javascripts/line_highlighter.js
@@ -57,8 +57,9 @@ require('vendor/jquery.scrollTo');
}
LineHighlighter.prototype.bindEvents = function() {
- $('#blob-content-holder').on('click', 'a[data-line-number]', this.clickHandler);
- $('#blob-content-holder').on('highlight:line', this.highlightHash);
+ const $blobContentHolder = $('#blob-content-holder');
+ $blobContentHolder.on('click', 'a[data-line-number]', this.clickHandler);
+ $blobContentHolder.on('highlight:line', this.highlightHash);
};
LineHighlighter.prototype.highlightHash = function() {