diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c44c710..e10fefe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,8 @@ jobs: react: [ 16.x, 17.x, - 18.x + 18.x, + beta ] fontawesome-svg-core: [ 1.2.x, diff --git a/CHANGELOG.md b/CHANGELOG.md index fc8c6fb..b37fdda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p --- +## [0.2.2](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.2.2) - 2024-05-22 + +### Fixed + +- Props with nullable/undefined values no longer throw an error #562 #560 + +--- + ## [0.2.1](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.2.1) - 2024-05-16 ### Changed - Remove defaultProps to be compatible with React 19 +--- + ## [0.2.0](https://github.com/FortAwesome/react-fontawesome/releases/tag/0.2.0) - 2022-06-29 ### Added diff --git a/README.md b/README.md index af3bd5d..4a211d6 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ being awesome contributors to this project. **We'd like to take a moment to reco | Alexey Victorov | [@AliMamed](https://github.com/AliMamed) | | Calum Smith | [@cpmsmith](https://github.com/cpmsmith) | | squiaios | [@squiaios](https://github.com/squiaios) | +| WyvernDrexx | [@WyvernDrexx](https://github.com/WyvernDrexx) | | Font Awesome Team | [@FortAwesome](https://github.com/orgs/FortAwesome/people)| If we've missed someone (which is quite likely) submit a Pull Request to us and we'll get it resolved. diff --git a/index.es.js b/index.es.js index 24def67..379fc0e 100644 --- a/index.es.js +++ b/index.es.js @@ -368,7 +368,7 @@ var FontAwesomeIcon = /*#__PURE__*/React.forwardRef(function (props, ref) { titleId = allProps.titleId, maskId = allProps.maskId; var iconLookup = normalizeIconArgs(iconArgs); - var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(allProps)), _toConsumableArray(className.split(' ')))); + var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(allProps)), _toConsumableArray((className || '').split(' ')))); var transform = objectWithKey('transform', typeof allProps.transform === 'string' ? parse.transform(allProps.transform) : allProps.transform); var mask = objectWithKey('mask', normalizeIconArgs(maskArgs)); var renderedIcon = icon(iconLookup, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes), transform), mask), {}, { diff --git a/index.js b/index.js index 7129ae8..3e34f43 100644 --- a/index.js +++ b/index.js @@ -375,7 +375,7 @@ titleId = allProps.titleId, maskId = allProps.maskId; var iconLookup = normalizeIconArgs(iconArgs); - var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(allProps)), _toConsumableArray(className.split(' ')))); + var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(allProps)), _toConsumableArray((className || '').split(' ')))); var transform = objectWithKey('transform', typeof allProps.transform === 'string' ? fontawesomeSvgCore.parse.transform(allProps.transform) : allProps.transform); var mask = objectWithKey('mask', normalizeIconArgs(maskArgs)); var renderedIcon = fontawesomeSvgCore.icon(iconLookup, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes), transform), mask), {}, { diff --git a/package-lock.json b/package-lock.json index e360e57..16639cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fortawesome/react-fontawesome", - "version": "0.2.0", + "version": "0.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@fortawesome/react-fontawesome", - "version": "0.2.0", + "version": "0.2.2", "license": "MIT", "dependencies": { "prop-types": "^15.8.1" diff --git a/package.json b/package.json index 59416d3..dd90d5e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@fortawesome/react-fontawesome", "description": "Official React component for Font Awesome", - "version": "0.2.1", + "version": "0.2.2", "main": "index.js", "module": "index.es.js", "jsnext:main": "index.es.js", @@ -28,7 +28,8 @@ "Tiago Sousa ", "Alexey Victorov ", "Calum Smith ", - "squiaios " + "squiaios ", + "WyvernDrexx " ], "license": "MIT", "scripts": {