@micromag/screen-urbania-article 0.3.736 → 0.3.742

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.
Files changed (2) hide show
  1. package/es/index.js +4 -1
  2. package/package.json +17 -17
package/es/index.js CHANGED
@@ -495,6 +495,8 @@ var UrbaniaLoader = function UrbaniaLoader(_ref) {
495
495
  mode: 'cors'
496
496
  }).then(function (art) {
497
497
  setArticle(art || null);
498
+ })["catch"](function () {
499
+ return setArticle(null);
498
500
  });
499
501
  }
500
502
  }, [finalUrl, setArticle]);
@@ -643,7 +645,7 @@ var UrbaniaLoader = function UrbaniaLoader(_ref) {
643
645
  };
644
646
  }, [article, finalUrl, props]);
645
647
  return /*#__PURE__*/React.createElement(Component, Object.assign({}, props, values, {
646
- hasArticle: finalUrl !== null
648
+ hasArticle: finalUrl !== null && article !== null
647
649
  }));
648
650
  };
649
651
  UrbaniaLoader.propTypes = propTypes$1;
@@ -1089,6 +1091,7 @@ var UrbaniaArticleCard = function UrbaniaArticleCard(_ref) {
1089
1091
  setControlsSuggestPlay(true);
1090
1092
  }
1091
1093
  }, [isView, current, playing, isBackgroundVideo, setPlaying, setControlsSuggestPlay]);
1094
+ console.log('hasUrl, hasArticle', hasUrl, hasArticle);
1092
1095
  return /*#__PURE__*/React.createElement("div", {
1093
1096
  className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.articleOpened, articleOpened), styles.isCurrent, current), styles.isPlaceholder, isPlaceholder)]),
1094
1097
  "data-screen-ready": isStatic || isCapture
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-urbania-article",
3
- "version": "0.3.736",
3
+ "version": "0.3.742",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -62,21 +62,21 @@
62
62
  "@babel/runtime": "^7.13.10",
63
63
  "@folklore/fetch": "^0.1.17",
64
64
  "@folklore/size": "^0.1.20",
65
- "@micromag/core": "^0.3.736",
66
- "@micromag/element-background": "^0.3.736",
67
- "@micromag/element-button": "^0.3.736",
68
- "@micromag/element-closed-captions": "^0.3.736",
69
- "@micromag/element-container": "^0.3.736",
70
- "@micromag/element-footer": "^0.3.736",
71
- "@micromag/element-header": "^0.3.736",
72
- "@micromag/element-heading": "^0.3.736",
73
- "@micromag/element-image": "^0.3.736",
74
- "@micromag/element-layout": "^0.3.736",
75
- "@micromag/element-text": "^0.3.736",
76
- "@micromag/element-urbania-author": "^0.3.736",
77
- "@micromag/element-video": "^0.3.736",
78
- "@micromag/element-visual": "^0.3.736",
79
- "@micromag/transforms": "^0.3.736",
65
+ "@micromag/core": "^0.3.742",
66
+ "@micromag/element-background": "^0.3.742",
67
+ "@micromag/element-button": "^0.3.742",
68
+ "@micromag/element-closed-captions": "^0.3.742",
69
+ "@micromag/element-container": "^0.3.742",
70
+ "@micromag/element-footer": "^0.3.742",
71
+ "@micromag/element-header": "^0.3.742",
72
+ "@micromag/element-heading": "^0.3.742",
73
+ "@micromag/element-image": "^0.3.742",
74
+ "@micromag/element-layout": "^0.3.742",
75
+ "@micromag/element-text": "^0.3.742",
76
+ "@micromag/element-urbania-author": "^0.3.742",
77
+ "@micromag/element-video": "^0.3.742",
78
+ "@micromag/element-visual": "^0.3.742",
79
+ "@micromag/transforms": "^0.3.742",
80
80
  "@react-spring/web": "^9.6.1",
81
81
  "@use-gesture/react": "^10.3.0",
82
82
  "classnames": "^2.2.6",
@@ -90,5 +90,5 @@
90
90
  "access": "public",
91
91
  "registry": "https://registry.npmjs.org/"
92
92
  },
93
- "gitHead": "77bd0bf6941418463c0f7bbb68bf9b20379c5c55"
93
+ "gitHead": "6d91233414c1db0bd803e405210418d05064714c"
94
94
  }