From b1e831c70c5e66b246f223ef802ec0ec14a115e8 Mon Sep 17 00:00:00 2001 From: Abrasimov Yaroslav Date: Tue, 24 Sep 2024 16:29:55 +0200 Subject: [PATCH] Experiment --- .../commerce-account-sidebar/commerce-account-sidebar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/blocks/commerce-account-sidebar/commerce-account-sidebar.js b/blocks/commerce-account-sidebar/commerce-account-sidebar.js index 60d58dab00..5ac6d43028 100644 --- a/blocks/commerce-account-sidebar/commerce-account-sidebar.js +++ b/blocks/commerce-account-sidebar/commerce-account-sidebar.js @@ -39,8 +39,12 @@ export default async function decorate(block) { }); block.innerHTML = ''; - sidebarItems.forEach((el) => { - block.appendChild(el); + + return new Promise((resolve) => { + sidebarItems.forEach((el) => { + block.appendChild(el); + }); + resolve(); }); }