diff --git a/src/cards/pop-up.ts b/src/cards/pop-up.ts index 1b8de39..87283e5 100644 --- a/src/cards/pop-up.ts +++ b/src/cards/pop-up.ts @@ -34,6 +34,16 @@ export function handlePopUp(context) { return; } + if (context.errorTriggered) { + return; + } + + if (!context.initStyleAdded && !context.popUp && !editor) { + // Hide vertical stack content before initialization + context.card.style.marginTop = '4000px'; + context.initStyleAdded = true; + } + let { customStyles, entityId, @@ -84,16 +94,6 @@ export function handlePopUp(context) { let closeTimeout; let rgbaBgColor; - if (context.errorTriggered) { - return; - } - - if (!context.initStyleAdded && !context.popUp && !editor) { - // Hide vertical stack content before initialization - context.card.style.marginTop = '4000px'; - context.initStyleAdded = true; - } - function removeHash() { history.replaceState(null, null, location.href.split('#')[0]); fireEvent(window, "location-changed", true);