@folklore/ads 0.0.20 → 0.0.21

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
@@ -980,11 +980,13 @@ function Ad(_ref) {
980
980
 
981
981
  // Targeting
982
982
  const contextTargeting = useAdsTargeting();
983
- const allTargeting = React.useMemo(() => contextTargeting !== null || targeting !== null || slotName !== null ? {
984
- slot: slotName,
983
+ const allTargeting = React.useMemo(() => ({
984
+ ...(slotName !== null ? {
985
+ slot: slotName
986
+ } : null),
985
987
  ...contextTargeting,
986
988
  ...targeting
987
- } : null, [contextTargeting, targeting, slotName]);
989
+ }), [contextTargeting, targeting, slotName]);
988
990
  const finalAdTargeting = React.useMemo(() => {
989
991
  const {
990
992
  refreshAds = null,
package/dist/es.js CHANGED
@@ -962,11 +962,13 @@ function Ad(_ref) {
962
962
 
963
963
  // Targeting
964
964
  const contextTargeting = useAdsTargeting();
965
- const allTargeting = useMemo(() => contextTargeting !== null || targeting !== null || slotName !== null ? {
966
- slot: slotName,
965
+ const allTargeting = useMemo(() => ({
966
+ ...(slotName !== null ? {
967
+ slot: slotName
968
+ } : null),
967
969
  ...contextTargeting,
968
970
  ...targeting
969
- } : null, [contextTargeting, targeting, slotName]);
971
+ }), [contextTargeting, targeting, slotName]);
970
972
  const finalAdTargeting = useMemo(() => {
971
973
  const {
972
974
  refreshAds = null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
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": "e1d76c01312a1d1556483e08d171f595a89016e4",
53
+ "gitHead": "a1fba2a5f49386559db95f06339bc64b134265b0",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.42",
56
56
  "@folklore/tracking": "^0.0.16",