Corrige un bug

engine-in-web-worker
Johan Girod 2023-09-07 16:49:38 +02:00 committed by Jérémy Rialland
parent 714fd32c04
commit 825b65722b
2 changed files with 5 additions and 11 deletions

View File

@ -206,7 +206,7 @@ export function WhenApplicable({
[dottedName, workerEngine]
)
return node?.nodeValue !== true ? <>{children}</> : null
return node?.nodeValue !== true ? null : <>{children}</>
}
export function WhenNotApplicable({

View File

@ -184,16 +184,10 @@ const caisses = [
function CaisseRetraite({ role }: { role?: string }) {
const unit = useSelector(targetUnitSelector)
const workerEngine = useWorkerEngine()
const rules = usePromiseOnSituationChange(
() =>
Promise.all(
caisses.map((caisse) =>
workerEngine.getRule(
`dirigeant . indépendant . PL . ${caisse} . cotisations` as DottedName
)
)
),
[]
const rules = caisses.map((caisse) =>
workerEngine.getRule(
`dirigeant . indépendant . PL . ${caisse} . cotisations` as DottedName
)
)
return (