Skip to content

Commit c36b1bd

Browse files
committed
fix: allow empty structs in v1 anchor to be parsed
1 parent c1a4f39 commit c36b1bd

File tree

1 file changed

+1
-1
lines changed
  • packages/nodes-from-anchor/src/v01/typeNodes

1 file changed

+1
-1
lines changed

packages/nodes-from-anchor/src/v01/typeNodes/TypeNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const typeNodeFromAnchorV01 = (idlType: IdlV01Type | IdlV01TypeDefTy): Ty
9292
}
9393

9494
// Struct and Tuple.
95-
if ('kind' in idlType && idlType.kind === 'struct' && 'fields' in idlType) {
95+
if ('kind' in idlType && idlType.kind === 'struct') {
9696
const fields = idlType.fields ?? [];
9797
if (isStructFieldArray(fields)) {
9898
return structTypeNodeFromAnchorV01(idlType);

0 commit comments

Comments
 (0)