Skip to content

Commit

Permalink
Spec update: add guard in IPv4 parser
Browse files Browse the repository at this point in the history
Now that 0d03572 is implemented, this change has no visible effect; it is purely done to match the spec text more exactly.
  • Loading branch information
domenic committed Jan 24, 2017
1 parent 3871b63 commit 7465c23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ function parseIPv4Number(input) {
function parseIPv4(input) {
const parts = input.split(".");
if (parts[parts.length - 1] === "") {
parts.pop();
if (parts.length > 1) {
parts.pop();
}
}

if (parts.length > 4) {
Expand Down

0 comments on commit 7465c23

Please sign in to comment.