Commit 81cf4370 authored by Thomas Randolph's avatar Thomas Randolph

Only attempt to use DOM nodes that exist

parent 6d159936
......@@ -223,10 +223,11 @@ export const contentTop = () => {
() => $('#js-peek').outerHeight(),
() => $('.navbar-gitlab').outerHeight(),
({ desktop }) => {
const container = document.querySelector('.line-resolve-all-container');
let size = 0;
if (!desktop) {
size = document.querySelector('.line-resolve-all-container').offsetHeight;
if (!desktop && container) {
size = container.offsetHeight;
}
return size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment