From 000790b11218dae6185e9ff699554903ae591f96 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 8 Jun 2021 21:19:20 +0300 Subject: [PATCH] vfmt: fix eating JS. from `JS.Struct{}` --- vlib/v/fmt/struct.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/fmt/struct.v b/vlib/v/fmt/struct.v index 79eb18aa15..5fb3695f66 100644 --- a/vlib/v/fmt/struct.v +++ b/vlib/v/fmt/struct.v @@ -256,7 +256,7 @@ pub fn (mut f Fmt) struct_init(node ast.StructInit) { type_sym := f.table.get_type_symbol(node.typ) // f.write('') mut name := type_sym.name - if !name.starts_with('C.') { + if !name.starts_with('C.') && !name.starts_with('JS.') { name = f.no_cur_mod(f.short_module(type_sym.name)) // TODO f.type_to_str? } if name == 'void' {