directus-extension-computed-interface
directus-extension-computed-interface copied to clipboard
fix: handle null emits
This PR verifies when the parsed expression returns a empty value and properly emits null, so Directus can take care of the empty field.
Closes #7
Now, this is the field behavior:

Because all types are valid, even null (NULL & NOT_NULL operators), we cannot pre-check whether a value is valid or not. I think it is best to leave the responsibility of checking unintended values to the operators.
I still can't reproduce your issue with {{ MULTIPLY(numero,2) }}. It may be due to something else, because null * 2 is still 0, right?