diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-18 12:36:27 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-28 13:29:32 +0100 |
commit | ae36ee6a149e532d594ef89195e8aebd257e0c66 (patch) | |
tree | 57fe58ea780c9688429ad6d6728584ea04eb1b89 | |
parent | 94749a45b792c18c6dbf4a59e30c145d1aa825d9 (diff) | |
download | gitlab-ce-ae36ee6a149e532d594ef89195e8aebd257e0c66.tar.gz |
Conditionally call loadCheck if lazyLoader is present
-rw-r--r-- | app/assets/javascripts/issuable_context.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/right_sidebar.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/issuable_context.js b/app/assets/javascripts/issuable_context.js index 0a8bab6ee66..9a9382a8d54 100644 --- a/app/assets/javascripts/issuable_context.js +++ b/app/assets/javascripts/issuable_context.js @@ -73,7 +73,7 @@ const PARTICIPANTS_ROW_COUNT = 7; $(".js-participants-hidden").toggle(); - gl.lazyLoader.loadCheck(); + if (gl.lazyLoader) gl.lazyLoader.loadCheck(); }; return IssuableContext; diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js index c06b8b6efe6..7a987fe336b 100644 --- a/app/assets/javascripts/right_sidebar.js +++ b/app/assets/javascripts/right_sidebar.js @@ -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); }; |