diff options
Diffstat (limited to 'app/assets/javascripts/nav/index.js')
-rw-r--r-- | app/assets/javascripts/nav/index.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/nav/index.js b/app/assets/javascripts/nav/index.js new file mode 100644 index 00000000000..646ce3f0ecf --- /dev/null +++ b/app/assets/javascripts/nav/index.js @@ -0,0 +1,12 @@ +export const initTopNav = async () => { + const el = document.getElementById('js-top-nav'); + + if (!el) { + return; + } + + // With combined_menu feature flag, there's a benefit to splitting up the import + const { mountTopNav } = await import(/* webpackChunkName: 'top_nav' */ './mount'); + + mountTopNav(el); +}; |