Skip to content

Commit

Permalink
fix: error alerts js crash (#17015)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter committed Oct 7, 2021
1 parent 50ad09b commit 03cdbac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
4 changes: 2 additions & 2 deletions superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 03cdbac

Please sign in to comment.