Skip to content

Commit

Permalink
refactor: allow mod XO learn more modal inside iframe (#1079)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeul authored Apr 30, 2024
1 parent 282c7fe commit 5884791
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/library/controllers/modal/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const memoizedModal = memoizeOnProps(
let renderProm;
// eslint-disable-next-line default-param-last
const renderModal = (selector = 'body', newProps, options = { intent: 'render' }) => {
const context = getTopWindow() === window ? 'iframe' : 'popup';
// TODO: determine a more flexible way to handle iframe vs. popup scenarios for our various entrypoints
const context = getTopWindow() === window || features === 'new-checkout-design' ? 'iframe' : 'popup';

if (renderProm && context !== 'popup') {
return renderProm.then(() => newProps && zoidComponent.updateProps(newProps));
Expand Down

0 comments on commit 5884791

Please sign in to comment.