Fix WhenApplicable

pull/2092/head
Jérémy Rialland 2022-04-07 11:12:28 +02:00 committed by Johan Girod
parent a951f64638
commit 22a10c4e64
1 changed files with 2 additions and 1 deletions

View File

@ -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,