mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
There was no null check for config.customAttributes
This commit is contained in:
parent
8f401bc31a
commit
6f74c88cc0
1 changed files with 3 additions and 1 deletions
|
|
@ -232,8 +232,10 @@ export class ListingPageComponent extends Component {
|
|||
} = currentListing.attributes;
|
||||
|
||||
const { customAttributes } = currentListing.attributes;
|
||||
const hasCategoryConfig = config.customAttributes && config.customAttributes.category;
|
||||
const hasCategoryAttribute = customAttributes && customAttributes.category;
|
||||
const category =
|
||||
config.customAttributes.category && customAttributes && customAttributes.category ? (
|
||||
hasCategoryConfig && hasCategoryAttribute ? (
|
||||
<span>
|
||||
<FormattedMessage id={`ListingPage.category.${customAttributes.category}`} />
|
||||
<span className={css.separator}>•</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue