Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truncateWords helper not working #344

Open
laurenhamel opened this issue Mar 6, 2019 · 1 comment · May be fixed by #345
Open

truncateWords helper not working #344

laurenhamel opened this issue Mar 6, 2019 · 1 comment · May be fixed by #345
Labels

Comments

@laurenhamel
Copy link

I'm attempting to use the truncateWords helper, but it's failing to truncate a block of text. It looks like the culprit is this line in the helper's definition:

if (num > arr.length) { ... }

My assumption is that it should read < instead of >.

@doowb
Copy link
Member

doowb commented Mar 6, 2019

I think you're right, thanks for opening the issue.

Would you like to submit a PR with the fix? If so, if you add some tests like the truncate tests that would be really helpful.

@doowb doowb added the bug label Mar 6, 2019
@laurenhamel laurenhamel linked a pull request Mar 6, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants