diff --git a/tpl/macro.twig b/tpl/macro.twig index 161daa1..6abfe5f 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -258,7 +258,7 @@ class {{o.name}} {{ _self.enum_values(o) }} - const DEFAULT_VALUE = {{o.values | first}}; + const DEFAULT_VALUE = {{o.values|length > 0 ? o.values | first : 0}}; function getClassId() {