Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the condition is "the object has the property"
Browse files Browse the repository at this point in the history
mamico committed Jul 28, 2024

Verified

This commit was signed with the committer’s verified signature.
brucebolt Bruce Bolt
1 parent f316321 commit 48ec340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ItaliaTheme/View/NewsItemView/NewsItemText.jsx
Original file line number Diff line number Diff line change
@@ -21,13 +21,13 @@ const NewsItemText = ({ content }) => {
// (richtext senza blocchi).
//
// TODO: al momento viene presentato uno solo dei due, valutare se
// mettere entrambi, il componente comunqu non mostra nulla se il
// mettere entrambi, il componente comunque non mostra nulla se il
// contenuto è vuoto.
//
// La condizione sul campo descrizione_estesa è volutamente semplificata
// senza `richTextHasContent` perchè non interessa tanto se il campo
// ha o non ha contenuto, ma se il campo esiste o non esiste
return content.descrizione_estesa ? (
return Object.hasOwn(content, 'descrizione_estesa') ? (
<RichTextSection
data={content.descrizione_estesa}
tag_id={'text-body'}

0 comments on commit 48ec340

Please sign in to comment.