Skip to content

Commit

Permalink
Re-check if frame is already present
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed Jul 8, 2024
1 parent 73ebdd1 commit c1c8b85
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/adRendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ export function insertLocatorFrame() {
const frame = createInvisibleIframe();
frame.name = PB_LOCATOR;
if (!document.body) {
window.requestAnimationFrame(() => {
document.body.appendChild(frame);
});
window.requestAnimationFrame(insertLocatorFrame);
} else {
document.body.appendChild(frame);
}
Expand Down

0 comments on commit c1c8b85

Please sign in to comment.