diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-10-05 15:14:33 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-10-05 15:14:33 +0200 |
commit | eda9e6b65baece281f45255e25a263e895d36db5 (patch) | |
tree | 8b6bc074a26289392d2e6bec5a3345a2306e1646 /app | |
parent | 8262cb2f4e9f366e99592859d6348f48da4a4d39 (diff) | |
download | gitlab-ce-eda9e6b65baece281f45255e25a263e895d36db5.tar.gz |
Fixed Linting Error + Error with Line Highlighter found in Test
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/line_highlighter.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/repo/components/repo_preview.vue | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js index ef91d471639..a75d1a4b8d0 100644 --- a/app/assets/javascripts/line_highlighter.js +++ b/app/assets/javascripts/line_highlighter.js @@ -56,7 +56,7 @@ LineHighlighter.prototype.bindEvents = function() { LineHighlighter.prototype.highlightHash = function(newHash) { let range; - if (newHash) this._hash = newHash; + if (newHash && typeof newHash === 'string') this._hash = newHash; this.clearHighlight(); diff --git a/app/assets/javascripts/repo/components/repo_preview.vue b/app/assets/javascripts/repo/components/repo_preview.vue index 514c7d9284c..04732489c5f 100644 --- a/app/assets/javascripts/repo/components/repo_preview.vue +++ b/app/assets/javascripts/repo/components/repo_preview.vue @@ -28,8 +28,8 @@ export default { this.highlightFile(); }); }, - activeLine(e) { - this.lineHighlighter.highlightHash('#L' + Store.activeLine); + activeLine() { + this.lineHighlighter.highlightHash(`#L${Store.activeLine}`); }, }, }; |