-
Notifications
You must be signed in to change notification settings - Fork 476
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
URI.withinString - TypeError: Cannot read property 'length' of undefined #303
Comments
Nice catch!
A fix, if you want to send a PR, would be to skip the string mutation and set |
Thanks for your quick answer and clues! |
Note to anyone experiencing the same problem:
=> Closing the Issue, as it solves the problem |
Hi,
I'm using URI.js in node.js (v4.2.6) [
npm install --save urijs
]And I wanted to extract several URLs from a text, so I wrote this little file:
lib/parseUrlsFromText.js
:* I then tried to test it, and then added the
console.log
s because of fails:test/parseUrlsFromText.js
:I have not dug further, but this solved my problem:
In (node_modules/urijs/src/)
URI.js:969
&972
-> conditional add of
slice.length
andresult.length
It may not be enough to make a Pull Request, but it's probably worth considering.
Hope that helps!
Cheers
The text was updated successfully, but these errors were encountered: