Skip to content

Commit

Permalink
Handle when IDL name missing (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra authored Jul 11, 2024
1 parent 8be999b commit 4bc994c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ChevronDown, ChevronUp, CornerDownRight } from 'react-feather';
import ReactJson from 'react-json-view';

export function getAnchorProgramName(program: Program | null): string | undefined {
return program ? snakeToTitleCase(program.idl.name) : undefined;
return program && 'name' in program.idl ? snakeToTitleCase(program.idl.name) : undefined;
}

export function AnchorProgramName({
Expand Down

0 comments on commit 4bc994c

Please sign in to comment.