Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[Terra-Icon] Removed Array from Icon Base #3717

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Conversation

supreethmr
Copy link
Contributor

@supreethmr supreethmr commented Feb 3, 2023

Summary

svgChildren = new Array(svgA11yLabel).concat(children);

Array used to concat title tag with svg was causing below warnings. these warnings were causing jest test failures on one of consuming project.

js Warning: Each child in a list should have a unique "key" prop. Check the render method of `IconBase`. See https://fb.me/react-warning-keys for more information.

Consuming project has below config which will make jest to fail for console warnings / errors.

console.error = (message, props) => {
  // An error occurred in the console, please fix the error. The error description should be above this message.
  throw (message instanceof Error ? message : new Error(message.replaceAll('%s', props)));
};

Closes UXPLATFORM-8297

Deployment Link

https://terra-core-deployed-pr-#.herokuapp.com/

Testing

no warnings / errors on browser console. verified on project which had jest failures

Screenshot 2023-02-03 at 5 27 19 PM

Additional Details

Thank you for contributing to Terra.
@cerner/terra

@supreethmr supreethmr requested a review from a team as a code owner February 3, 2023 11:59
@supreethmr supreethmr self-assigned this Feb 3, 2023
@supreethmr supreethmr merged commit 04cdbc1 into main Feb 6, 2023
@supreethmr supreethmr deleted the console-warnings-fix branch February 6, 2023 05:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants