Skip to content

Commit

Permalink
fix(formatter link): fixed for the undefined key (#530)
Browse files Browse the repository at this point in the history
* fix(formatter link): fixed the key is undefined
* fix: fixed a tiny issue
  • Loading branch information
hassanAdamineJad authored Oct 29, 2021
1 parent 91675d7 commit 9c622d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/molecules/table/components/formatter/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import styled from 'styled-components'

// UI
import StyledLink from '../../../../atoms/link/components/style'

const TableLink =
(path, key, value, dynamicUrl) =>
({ row }) => {
Expand All @@ -33,14 +32,15 @@ const TableLink =
}

const item = row[value]
const id = row[key]

return useLink ? (
item !== '-' || row[key] ? (
item !== '-' && id ? (
<StyleLink border={false} href={getPath()} onClick={handleClick}>
{item}
</StyleLink>
) : (
'-'
item || '-'
)
) : (
item
Expand Down

0 comments on commit 9c622d6

Please sign in to comment.