From 22a10c4e64a8aa51adff740df97f1f3e5b3ce67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 7 Apr 2022 11:12:28 +0200 Subject: [PATCH] Fix WhenApplicable --- site/source/components/EngineValue.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/source/components/EngineValue.tsx b/site/source/components/EngineValue.tsx index 26c996a93..b2408f132 100644 --- a/site/source/components/EngineValue.tsx +++ b/site/source/components/EngineValue.tsx @@ -127,12 +127,13 @@ export function WhenApplicable({ children: React.ReactNode }) { const engine = useEngine() - if (engine.evaluate(dottedName).nodeValue == null) { + if (engine.evaluate(dottedName).nodeValue === null) { return null } return <>{children} } + export function WhenNotApplicable({ dottedName, children,