Skip to content

Commit

Permalink
fix: check if reference is empty [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pfferrari committed Nov 13, 2023
1 parent 63b146a commit 6558272
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/app/src/pages/ReturnDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
goBack,
useTokenProvider
} from '@commercelayer/app-elements'
import isEmpty from 'lodash/isEmpty'
import { Link, useLocation, useRoute } from 'wouter'

export function ReturnDetails(): JSX.Element {
Expand Down Expand Up @@ -79,7 +80,9 @@ export function ReturnDetails(): JSX.Element {
})}
</div>
) : null}
{returnObj.reference != null && <div>Ref. {returnObj.reference}</div>}
{!isEmpty(returnObj.reference) && (
<div>Ref. {returnObj.reference}</div>
)}
</SkeletonTemplate>
}
onGoBack={() => {
Expand Down

0 comments on commit 6558272

Please sign in to comment.