Skip to content

Commit 48eccb8

Browse files
nurbobjornharrtell
andauthored
fix(idl_gen_ts): bool to number conversion in mutable API (#8677)
Co-authored-by: Björn Harrtell <[email protected]>
1 parent 3c0511f commit 48eccb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/idl_gen_ts.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,12 +1903,13 @@ class TsGenerator : public BaseGenerator {
19031903
code += " return false;\n";
19041904
code += " }\n\n";
19051905

1906-
// special case for bools, which are treated as uint8
19071906
code +=
19081907
" " + GenBBAccess() + write_method + "(this.bb_pos + offset, ";
1909-
if (field.value.type.base_type == BASE_TYPE_BOOL) { code += "+"; }
19101908
}
19111909

1910+
// special case for bools, which are treated as uint8
1911+
if (field.value.type.base_type == BASE_TYPE_BOOL) { code += "+"; }
1912+
19121913
code += "value);\n";
19131914
code += " return true;\n";
19141915
code += "}\n\n";

0 commit comments

Comments
 (0)