Skip to content

Fix truncate with option breakWord set to false#13

Open
bravomartin wants to merge 1 commit intojariz:masterfrom
bravomartin:master
Open

Fix truncate with option breakWord set to false#13
bravomartin wants to merge 1 commit intojariz:masterfrom
bravomartin:master

Conversation

@bravomartin
Copy link
Copy Markdown

There are three instances where this.conf was referenced, that cause the component to break when the option breakWord is set to false. This PR replaces conf for props, which works and is what is being used elsewhere.

words[words.length - 1] = words[words.length - 1].replace(/(,$)/g, '').replace(/(\.$)/g, '');
}
words.push(this.conf.ellipsis);
words.push(this.props.ellipsis);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this should be fixed in index.js as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants