chat: fix case where template accepts type content only (#19419)

* chat: fix case where template accepts type content only

* rm stray log

* reuse render_message_to_json
This commit is contained in:
Xuan-Son Nguyen
2026-02-09 22:14:12 +01:00
committed by GitHub
parent 262364e31d
commit 98e57ca422
5 changed files with 55 additions and 9 deletions
+6
View File
@@ -446,6 +446,12 @@ value for_statement::execute_impl(context & ctx) {
value iterable_val = iter_expr->execute(scope);
// mark the variable being iterated as used for stats
if (ctx.is_get_stats) {
iterable_val->stats.used = true;
iterable_val->stats.ops.insert("array_access");
}
if (iterable_val->is_undefined()) {
JJ_DEBUG("%s", "For loop iterable is undefined, skipping loop");
iterable_val = mk_val<value_array>();