Skip to content

Commit 08d64f9

Browse files
committed
update function to skip empty entries in querystring
1 parent f0e1410 commit 08d64f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sprint-2/implement/querystring.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ function parseQueryString(queryString) {
66
const keyValuePairs = queryString.split("&");
77

88
for (const pair of keyValuePairs) {
9+
if (pair === "") continue;
910
const index = pair.indexOf("=");
1011

1112
if (index === -1) {
@@ -21,3 +22,4 @@ function parseQueryString(queryString) {
2122
}
2223

2324
module.exports = parseQueryString;
25+

0 commit comments

Comments
 (0)