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
Handle invalid URL and invalid HTML input #152
Conversation
@@ -101,10 +101,13 @@ function Xray() { | |||
var $ = load(html, url); | |||
node.html($, next); | |||
}); | |||
} else { | |||
} else if (source) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This source
value is set to null
in the params
function when it does not pass either the isURL
or isHTML
test.
You need to merge master branch and resolve conflicts 😄 |
@@ -105,10 +105,13 @@ function Xray () { | |||
var $ = load(html, url) | |||
node.html($, next) | |||
}) | |||
} else { | |||
} else if (source) { | |||
// `url` is probably HTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think that we can avoid this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not my comment, but yeah, at this point the source
is almost certainly HTML. I would remove it or possibly reword it. Because source
is set to null in the params
function, it is not entirely obvious here why source
is null, so there might be some value in a comment.
I will leave it to you to decide, let me know and I will squash a change into my commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I was thinking, please delete it 😄
Thanks @gconnolly ! I'm waiting @matthewmueller enable greenkeeper integration to ship v2.1. I hope that for this week 😄 |
Thank you @Kikobeats |
Fx #151
Description
Handle null reference exception that occurs as a result of a source that is neither valid URL or HTML
Checklist