Open ArKam opened 4 weeks ago
Hello @ArKam
Can you show me your JSON data ?
it might be due to the JSON data numbers being strings?
Hi @acouvreur, I just used the default data, but you may be right, I’ll check that out on monday.
Ok, I finally had time to check that out, it seems related to the type of data used as the following kinda works (let me explain):
{{- if gt "$instance.DesiredReplicas" "1" }}
It works as the data type error message disappear and the theme does render, however, it doesn't work as, if I update the json value of DesiredReplicas with 4 for instance, it doesn't work as the renderer always choose the else path as it works in terms of "types compatibility" issue, it clearly doesn't work as the comparison doesn't match.
This is weird as gt is a int comparison function, not a string comparison one, so it should throw an error like "Unexpected data type for comparison".
Hi Alexis,
First of all, thanks for the editor link, it help me a lot to embed my css for the theme that I'm looking to contribute.
Now, I think I either missed something, or the GoTemplate parser doesn't support some function. Indeed, I have the following conditional function on my template:
This condition end up triggering an exception as follow on the editor:
error executing template: template: base:216:23: executing "base" at : error calling gt: incompatible types for comparison
However, this condition does work within sablier itself.