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

Removed for..of for browser compatibility #12

Merged
merged 3 commits into from
Sep 21, 2017

Conversation

pnicolli
Copy link
Contributor

The use of for..of was giving trouble with browser compatibility. Instead of trying to add babel-polyfill for just a simple loop, I switched to:

  • a good old for(;;) to loop over the NodeList returned by document.querySelectorAll()
  • a call to reduce to operate on the string tokens that are part of the string to ellipsize.

Fixes #6

@nzambello nzambello merged commit 150a236 into nzambello:master Sep 21, 2017
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.

2 participants