Skip to content

Commit

Permalink
Changed from polling to listening for an event
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmrj committed Jun 4, 2024
1 parent 99e4d1d commit f1b4a5e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libs/features/webapp-prompt/webapp-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ const geoRoutingActive = () => !!document.querySelector('.locale-modal-v2')
|| !!document.querySelector('.locale-modal');

const waitForClosedGRMThen = (loadPEP) => {
if (geoRoutingActive()) {
setTimeout(() => waitForClosedGRMThen(loadPEP), 200);
return;
}
document.addEventListener('milo:modal:closed', loadPEP);
loadPEP();
};

Expand Down

0 comments on commit f1b4a5e

Please sign in to comment.