Skip to content

Commit

Permalink
fix: resolve excerpt length issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefferson Rabb authored May 19, 2020
1 parent 7194b3d commit d40f98a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/editor/blocks/posts-inserter/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const getExcerptBlockTemplate = ( post, { excerptLength } ) => {
excerptElement.innerHTML = excerpt;
excerpt = excerptElement.textContent || excerptElement.innerText || '';

const needsEllipsis =
excerptLength < excerpt.trim().split( ' ' ).length && post.excerpt.raw === '';
const needsEllipsis = excerptLength < excerpt.trim().split( ' ' ).length;

const postExcerpt = needsEllipsis
? `${ excerpt.split( ' ', excerptLength ).join( ' ' ) } […]`
Expand Down

0 comments on commit d40f98a

Please sign in to comment.