Skip to content

Commit a02e73b

Browse files
committed
perf: merge if statements
1 parent c8426c3 commit a02e73b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/parse.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ function parse(input) {
7070
// Check '+', and replace it with empty space.
7171
else if (c === 43) {
7272
hasPlus = true;
73-
} else {
74-
// Check '%' character for encoding
75-
if (c === 37) {
76-
shouldEncode = true;
77-
}
73+
}
74+
// Check '%' character for encoding
75+
else if (c === 37) {
76+
shouldEncode = true;
7877
}
7978
}
8079

0 commit comments

Comments
 (0)