Add variable to save us a double lookup

This commit is contained in:
Douwe Maan 2017-04-27 12:22:16 -05:00
parent 6287e2825c
commit b6566277be
1 changed files with 3 additions and 2 deletions

View File

@ -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() {