diff options
author | Kamil Rojewski <kamil.rojewski@gmail.com> | 2021-02-25 23:57:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 14:57:10 -0800 |
commit | bf90612007f2163857eaefd5ab1989a9fd7fc253 (patch) | |
tree | 44a4fa16d67878c32f3dcb832dc90d5b3d4ad86f /src/idl_gen_ts.cpp | |
parent | 8142fedd196e20d24c48485396821b12034e7eb9 (diff) | |
download | flatbuffers-bf90612007f2163857eaefd5ab1989a9fd7fc253.tar.gz flatbuffers-bf90612007f2163857eaefd5ab1989a9fd7fc253.tar.bz2 flatbuffers-bf90612007f2163857eaefd5ab1989a9fd7fc253.zip |
fix for noUncheckedIndexedAccess in ts (#6474)
Diffstat (limited to 'src/idl_gen_ts.cpp')
-rw-r--r-- | src/idl_gen_ts.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/idl_gen_ts.cpp b/src/idl_gen_ts.cpp index 915b05e4..2ebf1f7f 100644 --- a/src/idl_gen_ts.cpp +++ b/src/idl_gen_ts.cpp @@ -1460,7 +1460,7 @@ class TsGenerator : public BaseGenerator { code += " for (let i = data.length - 1; i >= 0; i--) {\n"; code += " builder.add" + GenWriteMethod(vector_type) + "("; if (vector_type.base_type == BASE_TYPE_BOOL) { code += "+"; } - code += "data[i]);\n"; + code += "data[i]!);\n"; code += " }\n"; code += " return builder.endVector();\n"; code += "}\n\n"; |