Skip to content

Commit

Permalink
fix(web): do not show the registration alert when registration type u…
Browse files Browse the repository at this point in the history
…nknonw

The registration attribute is actually mandatory, but better to prevent
displaying the alert if it is missing for some reason.
  • Loading branch information
dgdavid committed Jan 7, 2025
1 parent 6fd4bda commit 6d0919e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/components/product/ProductRegistrationAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function ProductRegistrationAlert() {
// NOTE: it shouldn't be mounted in these paths, but let's prevent rendering
// if so just in case.
if (SUPPORTIVE_PATHS.includes(location.pathname)) return;
if (product.registration === "no" || !isEmpty(registration.key)) return;
if (["no", undefined].includes(product.registration) || !isEmpty(registration.key)) return;

return (
<Alert isInline variant="warning" title={sprintf(_("%s must be registered."), product.name)}>
Expand Down

0 comments on commit 6d0919e

Please sign in to comment.