Skip to content

Commit

Permalink
Add keys for error/warn messages
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Dec 14, 2020
1 parent 3fa28c0 commit 4d308d0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,22 @@ function InnerErrorsAndWarningsTreeView({
errors,
warnings,
}: InnerErrorsAndWarningsTreeViewProps) {
// TODO (inline errors) keys for each message
return (
<React.Fragment>
{errors.map(error => {
{errors.map((error, index) => {
return (
<ErrorOrWarningView
key={`error-${index}`}
className={styles.Error}
errorOrWarning={error}
icon={<Icon className={styles.ErrorIcon} type="error" />}
/>
);
})}
{warnings.map(warning => {
{warnings.map((warning, index) => {
return (
<ErrorOrWarningView
key={`warning-${index}`}
className={styles.Warning}
errorOrWarning={warning}
icon={<Icon className={styles.WarningIcon} type="warning" />}
Expand Down

0 comments on commit 4d308d0

Please sign in to comment.