@folklore/ads 0.0.4 → 0.0.5

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
@@ -744,9 +744,9 @@ AdsTargetingProvider.propTypes = propTypes$1;
744
744
  AdsTargetingProvider.defaultProps = defaultProps$1;
745
745
 
746
746
  function useTrackAd() {
747
- const tracking$1 = tracking.useTracking();
747
+ const tracking$1 = tracking.useTracking() || null;
748
748
  const trackEvent = React.useCallback((action, slot, renderEvent) => {
749
- if (typeof tracking$1.trackAd !== 'undefined') {
749
+ if (tracking$1 !== null && typeof tracking$1.trackAd !== 'undefined') {
750
750
  tracking$1.trackAd(action, slot, renderEvent);
751
751
  }
752
752
  }, [tracking$1]);
package/dist/es.js CHANGED
@@ -727,9 +727,9 @@ AdsTargetingProvider.propTypes = propTypes$1;
727
727
  AdsTargetingProvider.defaultProps = defaultProps$1;
728
728
 
729
729
  function useTrackAd() {
730
- const tracking = useTracking();
730
+ const tracking = useTracking() || null;
731
731
  const trackEvent = useCallback((action, slot, renderEvent) => {
732
- if (typeof tracking.trackAd !== 'undefined') {
732
+ if (tracking !== null && typeof tracking.trackAd !== 'undefined') {
733
733
  tracking.trackAd(action, slot, renderEvent);
734
734
  }
735
735
  }, [tracking]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
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": "5decdf4a216f0fb5ffb2c0f6877b274811326591",
53
+ "gitHead": "cbdee31b7e205f95c4ab462380feee74c076daa1",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.41",
56
56
  "@folklore/tracking": "^0.0.16",