Skip to content

Commit

Permalink
fix(interact): rendering arrays with no result
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlescano committed Nov 1, 2024
1 parent d71aa60 commit 8557b76
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/website/src/features/Packages/FunctionOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ export const FunctionOutput: FC<{
color="whiteAlpha.900"
verticalAlign="center"
>
{methodResult !== null || undefined
? String(methodResult)
: '---'}
{String(methodResult)}
</Text>
</Flex>
</Tooltip>
Expand All @@ -156,7 +154,7 @@ export const FunctionOutput: FC<{
<Text fontSize="xs" color="whiteAlpha.900" verticalAlign="center">
{methodResult !== null || undefined
? String(methodResult)
: '---'}
: '(no result)'}
</Text>
)}
</Flex>
Expand All @@ -182,7 +180,7 @@ export const FunctionOutput: FC<{
name={abiParameter.name || ''}
type={abiParameter.internalType || ''}
/>
{renderOutput(abiParameter, methodResult[index], index)}
{renderOutput(abiParameter, methodResult?.[index], index)}
</Box>
))
) : (
Expand Down

0 comments on commit 8557b76

Please sign in to comment.