diff --git a/CHANGELOG.md b/CHANGELOG.md index 067d39e..81f9257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p --- +## [0.3.2](https://github.com/FortAwesome/react-native-fontawesome/releases/tag/0.3.2) - 2024-05-23 + +### Fixed + +- Props with nullable/undefined values no longer throw an error + +--- + ## [0.3.1](https://github.com/FortAwesome/react-native-fontawesome/releases/tag/0.3.1) - 2024-05-16 ### Changed diff --git a/dist/components/FontAwesomeIcon.js b/dist/components/FontAwesomeIcon.js index 9900bbf..b87b492 100644 --- a/dist/components/FontAwesomeIcon.js +++ b/dist/components/FontAwesomeIcon.js @@ -109,7 +109,7 @@ function FontAwesomeIcon(props) { var _abstract = renderedIcon["abstract"]; // This is the color that will be passed to the "fill" prop of the Svg element - var color = _props.color || style.color || DEFAULT_COLOR; // This is the color that will be passed to the "fill" prop of the secondary Path element child (in Duotone Icons) + var color = _props.color || (style || {}).color || DEFAULT_COLOR; // This is the color that will be passed to the "fill" prop of the secondary Path element child (in Duotone Icons) // `null` value will result in using the primary color, at 40% opacity var secondaryColor = _props.secondaryColor || color; // Secondary layer opacity should default to 0.4, unless a specific opacity value or a specific secondary color was given @@ -118,8 +118,9 @@ function FontAwesomeIcon(props) { // or resolved in other ways, to avoid ambiguity as to which inputs cause which outputs in the underlying rendering process. // In other words, we don't want color (for example) to be specified via two different inputs. - var styleColor = style.color, - modifiedStyle = _objectWithoutProperties(style, _excluded); + var _ref2 = style || {}, + styleColor = _ref2.color, + modifiedStyle = _objectWithoutProperties(_ref2, _excluded); var resolvedHeight, resolvedWidth; diff --git a/package.json b/package.json index f1f5854..5805b11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fortawesome/react-native-fontawesome", - "version": "0.3.1", + "version": "0.3.2", "description": "Official React Native component for Font Awesome", "main": "index.js", "scripts": {