forked from BigfootDev/flatbuffers
fix(idl_gen_ts): bool to number conversion in mutable API (#8677)
Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
This commit is contained in:
@@ -1903,12 +1903,13 @@ class TsGenerator : public BaseGenerator {
|
||||
code += " return false;\n";
|
||||
code += " }\n\n";
|
||||
|
||||
// special case for bools, which are treated as uint8
|
||||
code +=
|
||||
" " + GenBBAccess() + write_method + "(this.bb_pos + offset, ";
|
||||
if (field.value.type.base_type == BASE_TYPE_BOOL) { code += "+"; }
|
||||
}
|
||||
|
||||
// special case for bools, which are treated as uint8
|
||||
if (field.value.type.base_type == BASE_TYPE_BOOL) { code += "+"; }
|
||||
|
||||
code += "value);\n";
|
||||
code += " return true;\n";
|
||||
code += "}\n\n";
|
||||
|
||||
Reference in New Issue
Block a user