InseeFr / Lunatic

Library of questionnaire components
https://inseefr.github.io/Lunatic/
MIT License
20 stars 21 forks source link

Fix/controls not showing #955

Closed Grafikart closed 5 months ago

Grafikart commented 5 months ago

executeExpression expect an object with a type / value representing an expression (VTL / VTL|MD...) but in checkBaseControl it received a string. Before the introduction of a type "TXT" string expression where evaluated as VTL expression, but it's not the case anymore :

// before
executeExpression('false') // false

// after "TXT" change
executeExpression('false') // "false"

But "false" == true, which cause the problem of controls being ignored after the "TXT" change. Maybe we should throw an error when receiving a string inside executeExpression (or log an error ?)