diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2017-06-30 20:55:09 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-06-30 20:55:09 +0000 |
commit | e48f54b5b23b4b865a4462151d576d2ff09d543e (patch) | |
tree | ff73231294c1ac2c6793fc9a46f3e93c88cd9734 /app/assets/javascripts/notes.js | |
parent | 30c7fef03955bb4d2627b1de419be672c97a6df6 (diff) | |
parent | 598baa554c29c7f69191b4ea46a049c558c3dbe5 (diff) | |
download | gitlab-ce-e48f54b5b23b4b865a4462151d576d2ff09d543e.tar.gz |
Merge branch 'enable-webpack-code-splitting' into 'master'
Enable webpack code splitting
Closes #32989
See merge request !12032
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r-- | app/assets/javascripts/notes.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 194d1730f3d..555b8c8a65c 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -18,6 +18,7 @@ import 'vendor/jquery.caret'; // required by jquery.atwho import 'vendor/jquery.atwho'; import AjaxCache from '~/lib/utils/ajax_cache'; import CommentTypeToggle from './comment_type_toggle'; +import loadAwardsHandler from './awards_handler'; import './autosave'; import './dropzone_input'; import './task_list'; @@ -291,8 +292,13 @@ export default class Notes { if ('emoji_award' in noteEntity.commands_changes) { votesBlock = $('.js-awards-block').eq(0); - gl.awardsHandler.addAwardToEmojiBar(votesBlock, noteEntity.commands_changes.emoji_award); - return gl.awardsHandler.scrollToAwards(); + + loadAwardsHandler().then((awardsHandler) => { + awardsHandler.addAwardToEmojiBar(votesBlock, noteEntity.commands_changes.emoji_award); + awardsHandler.scrollToAwards(); + }).catch(() => { + // ignore + }); } } } |