diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-08 15:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-08 15:08:41 +0300 |
commit | a0158b1a9c21f648fdbf79765bbc1e19e776b5d9 (patch) | |
tree | 04d5ecf7a5bb793e3f6a08914f5420dbda916171 /app/assets/javascripts/behaviors | |
parent | 49a897eff9081b39665a4827b4f685e142569b99 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r-- | app/assets/javascripts/behaviors/shortcuts.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts.js b/app/assets/javascripts/behaviors/shortcuts.js index 7987a533ae5..7352be0dbd5 100644 --- a/app/assets/javascripts/behaviors/shortcuts.js +++ b/app/assets/javascripts/behaviors/shortcuts.js @@ -1,5 +1,3 @@ -import Shortcuts from './shortcuts/shortcuts'; - export default function initPageShortcuts() { const { page } = document.body.dataset; const pagesWithCustomShortcuts = [ @@ -29,7 +27,9 @@ export default function initPageShortcuts() { // the pages above have their own shortcuts sub-classes instantiated elsewhere // TODO: replace this whitelist with something more automated/maintainable if (page && !pagesWithCustomShortcuts.includes(page)) { - return new Shortcuts(); + import(/* webpackChunkName: 'shortcutsBundle' */ './shortcuts/shortcuts') + .then(({ default: Shortcuts }) => new Shortcuts()) + .catch(() => {}); } return false; } |