Skip to content

Commit

Permalink
remove unnecessary async/await declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
elan-tbx committed Aug 23, 2024
1 parent 583643e commit 546d30a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/blocks/aside/aside.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ function decoratePromobar(el) {
return foreground;
}

async function loadIconography() {
function loadIconography() {
const { miloLibs, codeRoot } = getConfig();
const base = miloLibs || codeRoot;
await new Promise((resolve) => { loadStyle(`${base}/styles/iconography.css`, resolve); });
return new Promise((resolve) => { loadStyle(`${base}/styles/iconography.css`, resolve); });
}

async function decorateLayout(el) {
function decorateLayout(el) {
const elems = el.querySelectorAll(':scope > div');
if (elems.length > 1) {
decorateBlockBg(el, elems[0]);
Expand All @@ -191,7 +191,7 @@ async function decorateLayout(el) {
if (iconArea) {
const iconVariant = el.className.match(/-(avatar|lockup)/);
const iconClass = iconVariant ? `${iconVariant[1]}-area` : 'icon-area';
if (iconVariant) await loadIconography();
if (iconVariant) loadIconography();
iconArea.classList.add(iconClass);
}
const foregroundImage = foreground.querySelector(':scope > div:not(.text) img')?.closest('div');
Expand Down

0 comments on commit 546d30a

Please sign in to comment.