From 6d0919ea5d0868f9408943f57441616497479ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Tue, 7 Jan 2025 09:52:20 +0000 Subject: [PATCH] fix(web): do not show the registration alert when registration type unknonw The registration attribute is actually mandatory, but better to prevent displaying the alert if it is missing for some reason. --- web/src/components/product/ProductRegistrationAlert.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/product/ProductRegistrationAlert.tsx b/web/src/components/product/ProductRegistrationAlert.tsx index 4f09c30229..4693a969db 100644 --- a/web/src/components/product/ProductRegistrationAlert.tsx +++ b/web/src/components/product/ProductRegistrationAlert.tsx @@ -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 (