-
Notifications
You must be signed in to change notification settings - Fork 17
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
Middleware crashes when no query string is present #6
Comments
url.parse(options.url, true).query should not evaluate to undefined. What version of node are you running? If you run the following, do you get undefined? Open a node repl in your terminal by typing require('url').parse('https://www.google.com', true).query Can you give an example of a URL that returns undefined for Thanks! |
Running node 0.11.14. It comes back as undefined. Thanks,
|
Interesting. Thanks for that! I'll have to upgrade |
Node: 6.0 |
Just fixed this in master of https://github.com/prerender/prerender-node The change should be ported here to remove the |
meet the same problem. node v6.2.2 |
I have the same problem too. node v6.10.0 please reference this fix, it's work: |
I have the same problem |
This changes will fix the issue: Replace your line 104 in index.js: |
Line 104:
.parse(options.url, true).query.hasOwnProperty('escaped_fragment')) {
if there's no query this .parse(options.url, true).query will evaluate to undefined and .hasOwnProperty will crash taking down the whole pipeline.
The text was updated successfully, but these errors were encountered: