From 773a565637c3d58d52cf0fba8882ec33d967d016 Mon Sep 17 00:00:00 2001 From: robmadole Date: Thu, 16 May 2024 12:39:56 -0500 Subject: [PATCH] Fix tests --- .tool-versions | 2 +- src/components/FontAwesomeIcon.js | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.tool-versions b/.tool-versions index 7c790e8a..69cf9dc4 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ nodejs 14.17.3 -python 3.10.1 +python 3.9.19 2.7.18 diff --git a/src/components/FontAwesomeIcon.js b/src/components/FontAwesomeIcon.js index 6bd8ddef..bd32a4af 100644 --- a/src/components/FontAwesomeIcon.js +++ b/src/components/FontAwesomeIcon.js @@ -37,13 +37,23 @@ const defaultProps = { } const FontAwesomeIcon = React.forwardRef((props, ref) => { - const allProps = {...defaultProps, ...props} + const allProps = { ...defaultProps, ...props } - const iconLookup = normalizeIconArgs(allProps.icon) + const { + icon: iconArgs, + mask: maskArgs, + symbol, + className, + title, + titleId, + maskId + } = allProps + + const iconLookup = normalizeIconArgs(iconArgs) const classes = objectWithKey('classes', [ ...classList(allProps), - ...allProps.className.split(' ') + ...className.split(' ') ]) const transform = objectWithKey( 'transform', @@ -51,7 +61,7 @@ const FontAwesomeIcon = React.forwardRef((props, ref) => { ? parse.transform(allProps.transform) : allProps.transform ) - const mask = objectWithKey('mask', normalizeIconArgs(allProps.mask)) + const mask = objectWithKey('mask', normalizeIconArgs(maskArgs)) const renderedIcon = icon(iconLookup, { ...classes,