diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-09-29 09:07:47 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-10-04 17:27:56 +0200 |
commit | 45b8266bcd97c1132a5012ca4df578df4999c6ac (patch) | |
tree | cec5d95998d7ebfc2a0fffa62d564384d1607126 /app | |
parent | 9196a356ae675ab97e7ed49e48c1e59105ad2a81 (diff) | |
download | gitlab-ce-45b8266bcd97c1132a5012ca4df578df4999c6ac.tar.gz |
Fixed Eslint Errors
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/repo/components/repo_sidebar.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/repo/components/repo_sidebar.vue b/app/assets/javascripts/repo/components/repo_sidebar.vue index 702056a7e3a..f741a8d46bc 100644 --- a/app/assets/javascripts/repo/components/repo_sidebar.vue +++ b/app/assets/javascripts/repo/components/repo_sidebar.vue @@ -25,11 +25,11 @@ export default { methods: { addPopEventListener() { - window.addEventListener('popstate', (event) => { - let selectedFile = this.files.find(file => {return location.pathname.indexOf(file.url) > -1}); + window.addEventListener('popstate', () => { + let selectedFile = this.files.find(file => location.pathname.indexOf(file.url) > -1); if (!selectedFile) { // Maybe it is not in the current tree but in the opened tabs - selectedFile = Store.openedFiles.find(file => {return location.pathname.indexOf(file.url) > -1}); + selectedFile = Store.openedFiles.find(file => location.pathname.indexOf(file.url) > -1); } if (selectedFile) { if (selectedFile.url !== this.activeFile.url) { @@ -41,7 +41,7 @@ export default { if (!isNaN(lineNumber)) { Store.setActiveLine(lineNumber); if (Store.isPreviewView()) { - document.getElementById('L' + lineNumber).scrollIntoView(); + document.getElementById(`L${lineNumber}`).scrollIntoView(); } else { Helper.monacoInstance.setPosition({ lineNumber: this.activeLine, |