@micromag/screen-timeline 0.3.572 → 0.3.574

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 +2 -2
package/es/index.js CHANGED
@@ -138,12 +138,15 @@ var Timeline = function Timeline(_ref) {
138
138
  imageWidth = _useState4[0],
139
139
  setImageWidth = _useState4[1];
140
140
  useEffect(function () {
141
+ if (firstContentRef.current === null) {
142
+ return;
143
+ }
141
144
  if (firstLineRef.current !== null) {
142
145
  setImageWidth(firstContentRef.current.offsetWidth - firstLineRef.current.offsetWidth);
143
146
  } else {
144
147
  setImageWidth(firstContentRef.current.offsetWidth);
145
148
  }
146
- }, [width, height]);
149
+ }, [width, height, finalItems]);
147
150
  var timelineElements = (finalItems || []).map(function (item, itemI) {
148
151
  var _ref3 = item || {},
149
152
  _ref3$title = _ref3.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-timeline",
3
- "version": "0.3.572",
3
+ "version": "0.3.574",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -81,5 +81,5 @@
81
81
  "access": "public",
82
82
  "registry": "https://registry.npmjs.org/"
83
83
  },
84
- "gitHead": "275564dfe8d82442c50621f9dcf64ea182464002"
84
+ "gitHead": "55d7d4e599ab40e824a94d761d1d1b2134b50b36"
85
85
  }