diff --git a/src/components/BookingPanel/BookingPanel.js b/src/components/BookingPanel/BookingPanel.js index b8ff712c..f8198953 100644 --- a/src/components/BookingPanel/BookingPanel.js +++ b/src/components/BookingPanel/BookingPanel.js @@ -69,7 +69,9 @@ const BookingPanel = props => { } = props; const price = listing.attributes.price; - const isClosed = listing.attributes.state === LISTING_STATE_CLOSED; + const hasListingState = !!listing.attributes.state; + const isClosed = hasListingState && listing.attributes.state === LISTING_STATE_CLOSED; + const showBookingDatesForm = hasListingState && !isClosed; const showClosedListingHelpText = listing.id && isClosed; const { formattedPrice, priceTitle } = priceData(price, intl); const isBook = !!parse(location.search).book; @@ -113,7 +115,7 @@ const BookingPanel = props => {

{title}

{subTitleText ?
{subTitleText}
: null} - {!isClosed ? ( + {showBookingDatesForm ? ( { - {!isClosed ? ( + {showBookingDatesForm ? (