Conditionally call loadCheck if lazyLoader is present

This commit is contained in:
Luke "Jared" Bennett 2017-09-18 12:36:27 +01:00
parent 94749a45b7
commit ae36ee6a14
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
2 changed files with 2 additions and 3 deletions

View file

@ -73,7 +73,7 @@ const PARTICIPANTS_ROW_COUNT = 7;
$(".js-participants-hidden").toggle();
gl.lazyLoader.loadCheck();
if (gl.lazyLoader) gl.lazyLoader.loadCheck();
};
return IssuableContext;

View file

@ -47,8 +47,7 @@ import Cookies from 'js-cookie';
if (!triggered) {
Cookies.set("collapsed_gutter", $('.right-sidebar').hasClass('right-sidebar-collapsed'));
}
console.log('loadCheck')
gl.lazyLoader.loadCheck();
if (gl.lazyLoader) gl.lazyLoader.loadCheck();
});
return $(document).off('click', '.js-issuable-todo').on('click', '.js-issuable-todo', this.toggleTodo);
};