diff --git a/tpl/macro.twig b/tpl/macro.twig index be811ff..74d01a6 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -330,7 +330,9 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- if has_token(arg, 'bhl_ref_arg') ~%} var dv = stack.Pop(); {{arg_prefix}}{{arg.name}} = dv; + {%- if not has_token(arg.type, 'bhl_custom_rw') -%} {{ _self.val2native(arg.type, 'dv', arg_prefix ~ 'ref_' ~ arg.name) }}; + {%- endif ~%} {%- else ~%} var dv = stack.Pop(); {{ _self.val2native(arg.type, 'dv', arg_prefix ~ arg.name) }};