From 93c3532dda94d79ba95594c0fbbeda82a1bc1bf4 Mon Sep 17 00:00:00 2001 From: Blaine Gunn Date: Wed, 25 Sep 2024 15:52:56 -0600 Subject: [PATCH] MWPW-159098 --- acrobat/blocks/verb-widget/verb-widget.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/acrobat/blocks/verb-widget/verb-widget.js b/acrobat/blocks/verb-widget/verb-widget.js index 829943e1..fb18dc5d 100644 --- a/acrobat/blocks/verb-widget/verb-widget.js +++ b/acrobat/blocks/verb-widget/verb-widget.js @@ -136,12 +136,20 @@ export default async function init(element) { element.append(widget, footer); - window.addEventListener('IMS:Ready', async () => { - if (window.adobeIMS?.isSignedInUser() - && window.adobeIMS?.getAccountType() !== 'type1') { + // Redirect after IMS:Ready + window.addEventListener('IMS:Ready', () => { + console.log('IMS:Ready 😎'); + if (window.adobeIMS.isSignedInUser() + && window.adobeIMS.getAccountType() !== 'type1') { redDir(VERB); } }); + // Race Condition + if (window.adobeIMS?.isSignedInUser() + && window.adobeIMS?.getAccountType() !== 'type1') { + console.log('Race Con ⏩'); + redDir(VERB); + } // Analytics verbAnalytics('landing:shown', VERB);