Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

UrlParams parses a URL without parameters incorrectly #6008

Closed
lkcampbell opened this issue Nov 15, 2013 · 3 comments
Closed

UrlParams parses a URL without parameters incorrectly #6008

lkcampbell opened this issue Nov 15, 2013 · 3 comments
Assignees

Comments

@lkcampbell
Copy link
Contributor

OS Version: Mac OSX Mavericks

Brackets Version: Sprint 33

Repro Steps:
Open Brackets source code, then open Dev Tools to Console and paste the following code snippet into the Console:

UrlParams = require("utils/UrlParams").UrlParams;
var params = new UrlParams();
params.parse("http://www.foobar.com");
params

Look at the value of params._store

Observed Result:
params._store is an object with one property: http://www.foobar.com: "undefined"

Expected Result:
There are no parameters in the URL so params._store should be an empty object.

Additional Notes:
UrlParams needs an isEmpty() method to test for this scenario.

@ghost ghost assigned lkcampbell Nov 15, 2013
@lkcampbell
Copy link
Contributor Author

I am fixing this as part of a bigger fix for #5078. In addition to fixing this bug and adding the isEmpty() method, I will also be adding a remove() method and a set of unit tests for UrlParams.

@gruehle
Copy link
Member

gruehle commented Nov 18, 2013

Reviewed. Low priority to @lkcampbell

@redmunds
Copy link
Contributor

Thanks. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants