Skip to content

Commit ff3a8cd

Browse files
committed
Merge pull request #694 from rackt/revert-599-fix-withQuery
Revert "[fixed] Path.withQuery strips query if query is empty"
2 parents 2333325 + e24cf0f commit ff3a8cd

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

modules/utils/Path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ var Path = {
149149
if (queryString)
150150
return Path.withoutQuery(path) + '?' + queryString;
151151

152-
return Path.withoutQuery(path);
152+
return path;
153153
},
154154

155155
/**

modules/utils/__tests__/Path-test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,6 @@ describe('Path.withQuery', function () {
321321
expect(Path.withQuery('/a/b/c', { id: 'def' })).toEqual('/a/b/c?id=def');
322322
});
323323

324-
it('removes query string', function () {
325-
expect(Path.withQuery('/a/b/c?a=b', { a: undefined })).toEqual('/a/b/c');
326-
});
327-
328324
it('merges two query strings', function () {
329325
expect(Path.withQuery('/path?a=b', { c: [ 'd', 'e' ]})).toEqual('/path?a=b&c%5B0%5D=d&c%5B1%5D=e');
330326
});

0 commit comments

Comments
 (0)