This repository was archived by the owner on Jun 27, 2025. It is now read-only.
Commit 87a2a0b
committed
Use missingkey=zero rather than error in template rendering.
When performing complex template rendering, it is helpful to be
able to perform if statements based on the existence of a passed
variable like `if .env`. The template runs fine if the variable
is passed, but if it isn't the execution will stop because of the
missingkey setting. This change proposes setting the missingkey
value to zero rather than error. This means that rather than error
out, the operation returns the zero value for the map type's
element and the render execution can continue.1 parent 890ebbf commit 87a2a0b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
0 commit comments