⚙️ Ne pas remonter les missingVariables des règles rendues non applicables

pull/1105/head
Maxime Quandalle 2020-08-31 07:39:31 +02:00
parent d4bf66a355
commit 009fe610ae
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { map, mergeAll, pick, pipe } from 'ramda'
import { map, pick, pipe } from 'ramda'
import { typeWarning } from './error'
import {
bonus,
@ -41,10 +41,10 @@ export const evaluateApplicability = (
nodeValue: false,
missingVariables: notApplicable.missingVariables
}
: disabled?.nodeValue === true
? { nodeValue: false }
: applicable?.nodeValue === false
? { nodeValue: false, missingVariables: applicable.missingVariables }
: disabled?.nodeValue === true
? { nodeValue: false, missingVariables: disabled.missingVariables }
: {
nodeValue: [notApplicable, applicable, ...parentDependencies].some(
n => n?.nodeValue === null