diff --git a/packages/protocol-parser/src/getFieldIndex.ts b/packages/protocol-parser/src/getFieldIndex.ts index 82d38e8b70..88c6fb47b0 100644 --- a/packages/protocol-parser/src/getFieldIndex.ts +++ b/packages/protocol-parser/src/getFieldIndex.ts @@ -3,7 +3,7 @@ import { ValueSchema } from "./common"; export function getFieldIndex( valueSchema: valueSchema, - fieldName: keyof valueSchema, + fieldName: keyof valueSchema & string, ): number { const fieldNames = [ ...Object.entries(valueSchema) @@ -14,5 +14,5 @@ export function getFieldIndex( .map(([fieldName]) => fieldName), ]; - return fieldNames.indexOf(fieldName.toString()); + return fieldNames.indexOf(fieldName); }