Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 20, 2024
1 parent 871040a commit 24f0c88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/save.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function save( { attributes }: BlockSaveProps< BlockAttributes >
[ `is-sticky-${ sticky }` ]: sticky,
} );

const hasCaption: boolean = ! RichText.isEmpty( caption );
const hasCaption: boolean = ! RichText.isEmpty( caption || '' );

const Section = ( { type, rows }: { type: SectionName; rows: Row[] } ) => {
if ( ! rows.length ) {
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function save( { attributes }: BlockSaveProps< BlockAttributes >
};

const Caption = () => (
<RichText.Content tagName="figcaption" value={ caption } style={ captionStylesObj } />
<RichText.Content tagName="figcaption" value={ caption || '' } style={ captionStylesObj } />
);

return (
Expand Down

0 comments on commit 24f0c88

Please sign in to comment.