Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Apr 21, 2024
1 parent de1c9d4 commit e39ef88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export function createStore(initialValue: any, {
_postMessageToManyOrigins(window, value);

if (window.self === window.top) {
const iframes = document.querySelectorAll(iframeSelector);
const iframes = document.querySelectorAll(iframeSelector) as NodeListOf<HTMLIFrameElement>;

iframes.forEach(iframe => {
_postMessageToManyOrigins(iframe?.contentWindow, value)
iframes?.forEach(iframe => {
_postMessageToManyOrigins(iframe.contentWindow, value)
});
} else {
_postMessageToManyOrigins(window.parent, value)
Expand Down

0 comments on commit e39ef88

Please sign in to comment.