Skip to content

Commit

Permalink
fix: nc arguments might be null or an empty array, so we must handle …
Browse files Browse the repository at this point in the history
…it properly (#262)
  • Loading branch information
pedroferreira1 authored May 21, 2024
1 parent c49e7ad commit a70a5f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/tx/TxData.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,10 @@ class TxData extends React.Component {
}

const renderNCArguments = (args) => {
if (!Array.isArray(args) || args.length === 0) {
return ' - ';
}

return args.map((arg) => (
<div key={arg.name}>
<label>{arg.name}:</label> {renderArgValue(arg)}
Expand Down

0 comments on commit a70a5f9

Please sign in to comment.