diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/source_viewer/utils.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/source_viewer/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/source_viewer/utils.js b/app/assets/javascripts/vue_shared/components/source_viewer/utils.js index 71a6db1a72a..596829b51a4 100644 --- a/app/assets/javascripts/vue_shared/components/source_viewer/utils.js +++ b/app/assets/javascripts/vue_shared/components/source_viewer/utils.js @@ -10,7 +10,7 @@ const findLineContentElement = (lineNumber) => document.getElementById(`LC${line export const calculateBlameOffset = (lineNumber) => { if (lineNumber === 1) return '0px'; const blobViewerOffset = document.querySelector(VIEWER_SELECTOR)?.getBoundingClientRect().top; - const lineContentOffset = findLineContentElement(lineNumber).getBoundingClientRect().top; + const lineContentOffset = findLineContentElement(lineNumber)?.getBoundingClientRect().top; return `${lineContentOffset - blobViewerOffset}px`; }; |