diff --git a/src/codegen.inc.php b/src/codegen.inc.php index 3bbbdaf..505fe4d 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -330,7 +330,8 @@ function add_twig_filters(\Twig\Environment $twig) function(\mtgMetaField $field): string { $tag = get_field_alias_or_name($field); $type = $field->getType(); - if($type instanceof \mtgBuiltinType && !$type->isString() && !$type->isBlob()) { + if($type instanceof \mtgMetaEnum || + ($type instanceof \mtgBuiltinType && !$type->isString() && !$type->isBlob())) { return $tag.',string'; } return $tag;