Skip to content

Commit

Permalink
#414986 > using on load
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeSimoes committed Jan 9, 2024
1 parent 08a9950 commit 0f1c5b7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ export async function init(node = document) {
...priority.map(({ name, el }) => start({ name, el })),
]);

if (!loaded) {
window.addEventListener('load', () => {
loaded = true;
return rest.map(({ name, el }) => setTimeout(() => start({ name, el })));
});
} else {
rest.map(({ name, el }) => setTimeout(() => start({ name, el })));
}
// if (!loaded) {
// window.addEventListener('load', () => {
// loaded = true;
// return rest.map(({ name, el }) => setTimeout(() => start({ name, el })));
// });
// } else {
rest.map(({ name, el }) => setTimeout(() => start({ name, el })));
// }

// reload on breakpoint change
window.raqnBreakpoint = getBreakPoint();
Expand Down

0 comments on commit 0f1c5b7

Please sign in to comment.