@folklore/ads
Advanced tools
Comparing version 0.0.78 to 0.0.79
@@ -1083,2 +1083,5 @@ 'use strict'; | ||
React.useEffect(() => { | ||
if (id === null) { | ||
return () => {}; | ||
} | ||
setRichAd(null); | ||
@@ -1089,4 +1092,4 @@ function onMessage(event) { | ||
} | ||
const container = containerRef.current || document; | ||
const iframe = container.querySelector('iframe') || null; | ||
const container = containerRef.current || null; | ||
const iframe = container !== null ? container.querySelector('iframe') || null : null; | ||
if (iframe === null || iframe.contentWindow !== event.source) { | ||
@@ -1093,0 +1096,0 @@ return; |
@@ -1065,2 +1065,5 @@ import PropTypes from 'prop-types'; | ||
useEffect(() => { | ||
if (id === null) { | ||
return () => {}; | ||
} | ||
setRichAd(null); | ||
@@ -1071,4 +1074,4 @@ function onMessage(event) { | ||
} | ||
const container = containerRef.current || document; | ||
const iframe = container.querySelector('iframe') || null; | ||
const container = containerRef.current || null; | ||
const iframe = container !== null ? container.querySelector('iframe') || null : null; | ||
if (iframe === null || iframe.contentWindow !== event.source) { | ||
@@ -1075,0 +1078,0 @@ return; |
{ | ||
"name": "@folklore/ads", | ||
"version": "0.0.78", | ||
"version": "0.0.79", | ||
"description": "Ads library", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "305e55290b425a9b60853ce4b1a9688956f77f68", | ||
"gitHead": "d4912741fa4d4942651be59b0276fcbe8dd25e19", | ||
"dependencies": { | ||
@@ -56,0 +56,0 @@ "@folklore/hooks": "^0.0.65", |
83282
2633