@folklore/ads 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs.js CHANGED
@@ -1053,7 +1053,7 @@ function Ad(_ref) {
1053
1053
  // eslint-disable-next-line no-param-reassign
1054
1054
  slotRef.current = slotObject;
1055
1055
  }
1056
- if (isRendered) {
1056
+ if (isRendered && !isEmpty) {
1057
1057
  lastRenderedSize.current = {
1058
1058
  width,
1059
1059
  height
@@ -1066,7 +1066,7 @@ function Ad(_ref) {
1066
1066
  }
1067
1067
  const waitingNextRender = wasDisabled.current && !isRendered;
1068
1068
  const keepSize = shouldKeepSize && (disabled || waitingNextRender) && lastRenderedSize.current !== null;
1069
- if (id === null) {
1069
+ if (id === null && !keepSize) {
1070
1070
  return null;
1071
1071
  }
1072
1072
  let adStyle = null;
package/dist/es.js CHANGED
@@ -1035,7 +1035,7 @@ function Ad(_ref) {
1035
1035
  // eslint-disable-next-line no-param-reassign
1036
1036
  slotRef.current = slotObject;
1037
1037
  }
1038
- if (isRendered) {
1038
+ if (isRendered && !isEmpty) {
1039
1039
  lastRenderedSize.current = {
1040
1040
  width,
1041
1041
  height
@@ -1048,7 +1048,7 @@ function Ad(_ref) {
1048
1048
  }
1049
1049
  const waitingNextRender = wasDisabled.current && !isRendered;
1050
1050
  const keepSize = shouldKeepSize && (disabled || waitingNextRender) && lastRenderedSize.current !== null;
1051
- if (id === null) {
1051
+ if (id === null && !keepSize) {
1052
1052
  return null;
1053
1053
  }
1054
1054
  let adStyle = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Ads library",
5
5
  "keywords": [
6
6
  "javascript",
@@ -50,7 +50,7 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "02f9a585bd24267dc0032cab26ce37b0a0a7d316",
53
+ "gitHead": "3a1e4212010c89ae98e05a1eae2e333472ed5cb2",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.41",
56
56
  "@folklore/tracking": "^0.0.16",