Open spakanati opened 1 year ago
So you mean using the JS truthy value assertion for empty string, false and null? I think we can have both, before saving clean it, and also when actually making the defaults in runtime remove "falsy" values. What do you think?
📜 Description
When creating a template, even when you do not set a default variable, the value is set to an empty string.
👟 Reproduction steps
Create a template and use a variable named
testVar
but do not enter a default value. SendtestVar
in your payload as null or undefined.👍 Expected behavior
Novu should not overwrite with an empty string if there is no default value set.
👎 Actual Behavior with Screenshots
Note that when inspecting the "payload" in the activity feed Novu will have sent an empty string as a default value for
testVar
.You can also check by getting the template from the API and seeing this in the variables: