From 6f74c88cc06e20cb5361d7a606c248e6c0155cd2 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Thu, 4 Jan 2018 14:19:30 +0200 Subject: [PATCH] There was no null check for config.customAttributes --- src/containers/ListingPage/ListingPage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/ListingPage/ListingPage.js b/src/containers/ListingPage/ListingPage.js index f7b2f43c..eb798d9f 100644 --- a/src/containers/ListingPage/ListingPage.js +++ b/src/containers/ListingPage/ListingPage.js @@ -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 ? (