Skip to content

Commit

Permalink
fix: check 'delta' is exists before call the toFixed function (#2437)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Jun 16, 2023
1 parent e206e56 commit b46f6ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -136,10 +136,10 @@ function AdditionalColumnField({
// allow the edition of correlations
const commonLinksMenu = commonLinks.flatMap((commonLink) => {
const commonLinkContextMenuLabel = `${getAbbreviation(commonLink)} (${
commonLink.signal.x ? commonLink.signal.x.delta.toFixed(2) : '?'
}, ${commonLink.signal.y ? commonLink.signal.y.delta.toFixed(2) : '?'})${
commonLink.edited?.moved === true ? '[MOVED]' : ''
}`;
commonLink.signal.x?.delta ? commonLink.signal.x.delta.toFixed(2) : '?'
}, ${
commonLink.signal.y?.delta ? commonLink.signal.y.delta.toFixed(2) : '?'
})${commonLink.edited?.moved === true ? '[MOVED]' : ''}`;

return commonLink.pseudo === false
? [
Expand Down
Expand Up @@ -290,7 +290,7 @@ function CorrelationTableRow({
onSave={onSaveEquivalencesHandler}
/>
) : (
<text style={equivalenceCellStyle}>{correlation.equivalence}</text>
<span style={equivalenceCellStyle}>{correlation.equivalence}</span>
)}
</td>
<td title={t} {...otherTableDataProps}>
Expand Down

0 comments on commit b46f6ec

Please sign in to comment.