fix generating json tag

This commit is contained in:
Pavel Merzlyakov 2024-02-02 10:29:13 +03:00
parent c9dcf199d3
commit bf96a68d58
1 changed files with 5 additions and 1 deletions

View File

@ -329,7 +329,11 @@ function add_twig_filters(\Twig\Environment $twig)
'json_tag',
function(\mtgMetaField $field): string {
$tag = get_field_alias_or_name($field);
return $tag.',string';
$type = $field->getType();
if($type instanceof \mtgBuiltinType && !$type->isString() && !$type->isBlob()) {
return $tag.',string';
}
return $tag;
}
));
}