Skip to content

Commit

Permalink
[SW-2210]wrong date content collection (#1248)
Browse files Browse the repository at this point in the history
* testing

* adding conditional for news content type

* update be

* console log

* adding new date for news

* reverting env file and using logical or
  • Loading branch information
yeniatencio committed Oct 25, 2022
1 parent 4407518 commit 477a976
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -992,13 +992,12 @@ module.exports = class ContentCollection {
let mappedResult = null
const _source = item._source
const link = this.getLocalisedLinkFromSource(_source)

switch (this.getDisplayResultComponentType()) {
case 'search-result':
mappedResult = {
title: _source.title?.[0],
link: link ? { linkText: link.domain + link.path, linkUrl: link.path } : null,
date: _source.created?.[0],
date: _source.field_news_date?.[0] || _source.created?.[0],
description: _source.field_landing_page_summary?.[0]
}
break
Expand Down

0 comments on commit 477a976

Please sign in to comment.