Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: handle invalid URL #163

Merged
merged 1 commit into from
Sep 1, 2020
Merged

fix: handle invalid URL #163

merged 1 commit into from
Sep 1, 2020

Conversation

SukkaW
Copy link
Member

@SukkaW SukkaW commented Aug 31, 2020

@SukkaW SukkaW requested a review from curbengh August 31, 2020 14:19
@coveralls
Copy link

coveralls commented Aug 31, 2020

Coverage Status

Coverage increased (+0.09%) to 97.938% when pulling 7628d48 on SukkaW:add-foolproof into 0abcf7d on hexojs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 97.938% when pulling 46ea0d6 on SukkaW:add-foolproof into 0abcf7d on hexojs:master.


try {
out += encodeURL(href);
} catch (e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch binding is optional in Node 10+, tested with eslint.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. It is available since Node.js 10.0.0.

Might remove all of them later.

@SukkaW SukkaW merged commit 3b85cf0 into hexojs:master Sep 1, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError [ERR_INVALID_URL]: Invalid URL
3 participants