fix: error alerts js crash (#17015)

This commit is contained in:
Erik Ritter 2021-10-07 13:09:54 -07:00 committed by GitHub
parent 50ad09bbdc
commit 03cdbac8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ export default function BasicErrorAlert({
return (
<StyledContainer level={level} role="alert">
{level === 'error' ? (
{!level || level === 'error' ? (
<Icons.ErrorSolid iconColor={theme.colors[level].base} />
) : (
<Icons.WarningSolid iconColor={theme.colors[level].base} />

View File

@ -108,7 +108,7 @@ export default function ErrorAlert({
<ErrorAlertDiv level={level} role="alert">
<div className="top-row">
<LeftSideContent>
{level === 'error' ? (
{!level || level === 'error' ? (
<Icons.ErrorSolid
className="icon"
iconColor={theme.colors[level].base}
@ -171,7 +171,7 @@ export default function ErrorAlert({
onHide={() => setIsModalOpen(false)}
title={
<div className="header">
{level === 'error' ? (
{!level || level === 'error' ? (
<Icons.ErrorSolid
className="icon"
iconColor={theme.colors[level].base}