@folklore/ads
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -867,2 +867,5 @@ 'use strict'; | ||
if (slot === null) { | ||
if (renderEvent !== null) { | ||
setRenderEvent(null); | ||
} | ||
return () => {}; | ||
@@ -1017,2 +1020,14 @@ } | ||
}, [onRender, shouldKeepSize, disabled]); | ||
React.useEffect(() => { | ||
if (!disabled) { | ||
return; | ||
} | ||
const keepSize = shouldKeepSize && lastRenderedSize.current !== null; | ||
if (onRender !== null) { | ||
onRender({ | ||
isEmpty: true, | ||
keepSize | ||
}); | ||
} | ||
}, [disabled]); | ||
@@ -1019,0 +1034,0 @@ // Create ad |
@@ -849,2 +849,5 @@ import PropTypes from 'prop-types'; | ||
if (slot === null) { | ||
if (renderEvent !== null) { | ||
setRenderEvent(null); | ||
} | ||
return () => {}; | ||
@@ -999,2 +1002,14 @@ } | ||
}, [onRender, shouldKeepSize, disabled]); | ||
useEffect(() => { | ||
if (!disabled) { | ||
return; | ||
} | ||
const keepSize = shouldKeepSize && lastRenderedSize.current !== null; | ||
if (onRender !== null) { | ||
onRender({ | ||
isEmpty: true, | ||
keepSize | ||
}); | ||
} | ||
}, [disabled]); | ||
@@ -1001,0 +1016,0 @@ // Create ad |
{ | ||
"name": "@folklore/ads", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Ads library", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "979144c5a475f77dbfb74a4f351166fec318c6c2", | ||
"gitHead": "02f9a585bd24267dc0032cab26ce37b0a0a7d316", | ||
"dependencies": { | ||
@@ -56,0 +56,0 @@ "@folklore/hooks": "^0.0.41", |
68102
2171