Skip to content

Commit 1f8bdfa

Browse files
Resolve missing typeof
1 parent 204705b commit 1f8bdfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/binary_parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,9 +1368,9 @@ export class Parser {
13681368
ctx.pushCode(`var ${item} = ${name}[${itemCounter}];`);
13691369
ctx.pushCode(`${itemCounter}++;`);
13701370

1371-
if (type === 'string') {
1371+
if (typeof type === 'string') {
13721372
if (!aliasRegistry[type]) {
1373-
ctx.pushCode(`smartBuffer.write${CAPITILIZED_TYPE_NAMES[type]}(${item});`);
1373+
ctx.pushCode(`smartBuffer.write${CAPITILIZED_TYPE_NAMES[type as Types]}(${item});`);
13741374
} else {
13751375
ctx.pushCode(
13761376
`smartBuffer.writeBuffer(${FUNCTION_ENCODE_PREFIX + type}(${item}));`

0 commit comments

Comments
 (0)