We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 204705b commit 1f8bdfaCopy full SHA for 1f8bdfa
lib/binary_parser.ts
@@ -1368,9 +1368,9 @@ export class Parser {
1368
ctx.pushCode(`var ${item} = ${name}[${itemCounter}];`);
1369
ctx.pushCode(`${itemCounter}++;`);
1370
1371
- if (type === 'string') {
+ if (typeof type === 'string') {
1372
if (!aliasRegistry[type]) {
1373
- ctx.pushCode(`smartBuffer.write${CAPITILIZED_TYPE_NAMES[type]}(${item});`);
+ ctx.pushCode(`smartBuffer.write${CAPITILIZED_TYPE_NAMES[type as Types]}(${item});`);
1374
} else {
1375
ctx.pushCode(
1376
`smartBuffer.writeBuffer(${FUNCTION_ENCODE_PREFIX + type}(${item}));`
0 commit comments