Skip to content

Commit

Permalink
Merge pull request #828 from adobecom/MWPW-159098
Browse files Browse the repository at this point in the history
MWPW-159098 - Race Condition ?
  • Loading branch information
Blainegunn authored Sep 25, 2024
2 parents 586423b + 572d6b0 commit fbed59f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,20 @@ export default async function init(element) {

element.append(widget, footer);

window.addEventListener('IMS:Ready', async () => {
console.log('IMS:Ready 😎')
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);
Expand Down

0 comments on commit fbed59f

Please sign in to comment.