taro-css-to-react-native 3.4.7 → 3.4.10

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/index.js CHANGED
@@ -53,7 +53,8 @@ var transformDecls = function transformDecls(styles, declarations, result) {
53
53
  var isUnsupportedUnit = unsupportedUnitRe.test(value);
54
54
 
55
55
  if (property === 'line-height' && !isLengthUnit && !isViewportUnit && !isPercent && !isUnsupportedUnit) {
56
- throw new Error("Failed to parse declaration \"".concat(property, ": ").concat(value, "\""));
56
+ // ignore invalid value avoid throw error cause app crash
57
+ continue;
57
58
  }
58
59
 
59
60
  if (!result.__viewportUnits && isViewportUnit) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "taro-css-to-react-native",
3
3
  "description": "Convert CSS text to a React Native stylesheet object",
4
- "version": "3.4.7",
4
+ "version": "3.4.10",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -63,5 +63,5 @@
63
63
  "CHANGELOG.md",
64
64
  "README.md"
65
65
  ],
66
- "gitHead": "bb62ad5d4f099940c8c4d6dfcba9b743bc3d2acf"
66
+ "gitHead": "5e57252a81409389b85b8786db5d3d9d92246161"
67
67
  }
package/src/index.js CHANGED
@@ -43,7 +43,8 @@ const transformDecls = (styles, declarations, result, options = {}) => {
43
43
  !isPercent &&
44
44
  !isUnsupportedUnit
45
45
  ) {
46
- throw new Error(`Failed to parse declaration "${property}: ${value}"`)
46
+ // ignore invalid value avoid throw error cause app crash
47
+ continue
47
48
  }
48
49
 
49
50
  if (!result.__viewportUnits && isViewportUnit) {