fixed packing structs in nested buffers (#6509)

This commit is contained in:
Kamil Rojewski
2021-03-11 20:14:23 +01:00
committed by GitHub
parent 0e453ac352
commit 6543ba5297
5 changed files with 21 additions and 10 deletions

View File

@@ -856,7 +856,7 @@ class TsGenerator : public BaseGenerator {
const std::string field_accessor = "this." + field_name + "()";
field_val = GenNullCheckConditional(field_accessor,
field_accessor + "!.unpack()");
field_offset_val = GenNullCheckConditional(
field_offset_decl = GenNullCheckConditional(
"this." + field_name, "this." + field_name + "!.pack(builder)",
"0");