Commit e51a0df3 authored by Tim Zallmann's avatar Tim Zallmann

Changed function setup

parent 8edfbe3d
...@@ -17,7 +17,7 @@ const frequentItemDropdowns = [ ...@@ -17,7 +17,7 @@ const frequentItemDropdowns = [
}, },
]; ];
function initFrequentItemDropdowns() { const initFrequentItemDropdowns = () => {
frequentItemDropdowns.forEach(dropdown => { frequentItemDropdowns.forEach(dropdown => {
const { namespace, key } = dropdown; const { namespace, key } = dropdown;
const el = document.getElementById(`js-${namespace}-dropdown`); const el = document.getElementById(`js-${namespace}-dropdown`);
...@@ -66,7 +66,7 @@ function initFrequentItemDropdowns() { ...@@ -66,7 +66,7 @@ function initFrequentItemDropdowns() {
}, },
}); });
}); });
} };
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
requestIdleCallback(initFrequentItemDropdowns); requestIdleCallback(initFrequentItemDropdowns);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment