Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
infloent committed Oct 25, 2024
1 parent 260e7ff commit 8f55f85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default {
this.pageVirtualDomManipulation,
this.loadAndProcessTemplate,
this.renderPage,
this.onPageRender,
);
},

Expand All @@ -34,10 +33,6 @@ export default {
}
},

onPageRender() {
Promise.allSettled(window.raqnOnComponentsLoaded).then(() => {});
},

async loadAndProcessTemplate() {
// await for the tasks because this.templateContent is running async to fetch the template
await runTasks(
Expand Down
4 changes: 2 additions & 2 deletions scripts/render/dom-reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ export const loadModules = (nodes, extra = {}) => {
.sort((a, b) => modules[a].priority - modules[b].priority)
.flatMap((component) => {
const { tag, priority } = modules[component];
if (window.raqnComponents[tag]) return window.raqnComponents[tag].default;
if (window.raqnComponents[tag]) return window.raqnComponents[tag];
if (!modules[component]?.module?.path) return [];
return new Promise((resolve) => {
setTimeout(async () => {
resolve(await loadAndDefine(modules[component]));
resolve(await loadAndDefine(modules[component]).js);
}, priority || 0);
});
});
Expand Down

0 comments on commit 8f55f85

Please sign in to comment.