diff options
Diffstat (limited to 'app/assets/javascripts/code_navigation')
-rw-r--r-- | app/assets/javascripts/code_navigation/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/code_navigation/store/actions.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/code_navigation/utils/index.js | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/code_navigation/index.js b/app/assets/javascripts/code_navigation/index.js index fa5835245bc..38b3467dc33 100644 --- a/app/assets/javascripts/code_navigation/index.js +++ b/app/assets/javascripts/code_navigation/index.js @@ -3,7 +3,7 @@ import Vuex from 'vuex'; import createStore from './store'; import App from './components/app.vue'; -export default initialData => { +export default (initialData) => { const el = document.getElementById('js-code-navigation'); if (!el) return null; diff --git a/app/assets/javascripts/code_navigation/store/actions.js b/app/assets/javascripts/code_navigation/store/actions.js index 9a472ca014f..fb77a70de0b 100644 --- a/app/assets/javascripts/code_navigation/store/actions.js +++ b/app/assets/javascripts/code_navigation/store/actions.js @@ -34,7 +34,7 @@ export default { }, showBlobInteractionZones({ state }, path) { if (state.data && state.data[path]) { - Object.values(state.data[path]).forEach(d => addInteractionClass(path, d)); + Object.values(state.data[path]).forEach((d) => addInteractionClass(path, d)); } }, showDefinition({ commit, state }, { target: el }) { diff --git a/app/assets/javascripts/code_navigation/utils/index.js b/app/assets/javascripts/code_navigation/utils/index.js index bb33bc556af..6c078891ed4 100644 --- a/app/assets/javascripts/code_navigation/utils/index.js +++ b/app/assets/javascripts/code_navigation/utils/index.js @@ -1,7 +1,7 @@ export const cachedData = new Map(); export const getCurrentHoverElement = () => cachedData.get('current'); -export const setCurrentHoverElement = el => cachedData.set('current', el); +export const setCurrentHoverElement = (el) => cachedData.set('current', el); export const addInteractionClass = (path, d) => { const lineNumber = d.start_line + 1; @@ -10,7 +10,7 @@ export const addInteractionClass = (path, d) => { .querySelectorAll(`.blob-content #LC${lineNumber}, .line_content:not(.old) #LC${lineNumber}`); if (!lines?.length) return; - lines.forEach(line => { + lines.forEach((line) => { let charCount = 0; const el = [...line.childNodes].find(({ textContent }) => { if (charCount === d.start_char) return true; |