Skip to content

Commit

Permalink
Merge pull request #326 from Financial-Times/null-join-fix
Browse files Browse the repository at this point in the history
Handle asset content_areas coming back as null
  • Loading branch information
debugwand authored Oct 7, 2021
2 parents fd1ed56 + ab2b526 commit 68039c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ft-next-syndication-api",
"description": "Next Syndication API",
"version": "0.38.4",
"version": "0.38.5",
"private": true,
"dependencies": {
"@financial-times/n-es-client": "3.0.0",
Expand Down
4 changes: 3 additions & 1 deletion server/lib/get-contract-by-id.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function decorateContract(contract, hasGraphics = false) {
acc[asset.content_type] = asset;

asset.assets.forEach(item => {
item.content = item.content_set.join('; ');
if (Array.isArray(item.content_set)) {
item.content = item.content_set.join('; ');
}

if (Array.isArray(item.addendums) && item.addendums.length) {
asset.hasAddendums = true;
Expand Down

0 comments on commit 68039c0

Please sign in to comment.