@micromag/element-image 0.3.119 → 0.3.124

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/es/index.js CHANGED
@@ -172,8 +172,8 @@ var Image = function Image(_ref) {
172
172
  } else {
173
173
  var validWidth = width !== null && typeof width === 'number';
174
174
  var validHeight = height !== null && typeof height === 'number';
175
- var ratioWidth = validHeight ? height * mediaRatio : null;
176
- var ratioHeight = validWidth ? width / mediaRatio : null;
175
+ var ratioWidth = mediaRatio && validHeight ? height * mediaRatio : null;
176
+ var ratioHeight = mediaRatio && validWidth ? width / mediaRatio : null;
177
177
 
178
178
  var _finalWidth = width !== null ? width : ratioWidth;
179
179
 
package/lib/index.js CHANGED
@@ -183,8 +183,8 @@ var Image = function Image(_ref) {
183
183
  } else {
184
184
  var validWidth = width !== null && typeof width === 'number';
185
185
  var validHeight = height !== null && typeof height === 'number';
186
- var ratioWidth = validHeight ? height * mediaRatio : null;
187
- var ratioHeight = validWidth ? width / mediaRatio : null;
186
+ var ratioWidth = mediaRatio && validHeight ? height * mediaRatio : null;
187
+ var ratioHeight = mediaRatio && validWidth ? width / mediaRatio : null;
188
188
 
189
189
  var _finalWidth = width !== null ? width : ratioWidth;
190
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-image",
3
- "version": "0.3.119",
3
+ "version": "0.3.124",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
52
  "@folklore/size": "^0.1.20",
53
- "@micromag/core": "^0.3.119",
53
+ "@micromag/core": "^0.3.124",
54
54
  "classnames": "^2.2.6",
55
55
  "prop-types": "^15.7.2",
56
56
  "react-intl": "^5.12.1",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "009841dc1641be98ddce6ed56cfcddc22509f342"
62
+ "gitHead": "9050944df1d66cae14e04a771f739e2743894fb8"
63
63
  }