Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($location): remove query args when passed in object #6573

Closed
wants to merge 1 commit into from

Conversation

SekibOmazic
Copy link
Contributor

Request Type:

How to reproduce:

Component(s): $location

Impact: small

Complexity: small

This issue is related to:

Detailed Description:

Please read the description from the issue #6565

Other Comments:

Query args will be removed from $location search object if they are passed in as null or undefined object properties.

Uses Object.keys() to fix the bug so it will not work for IE8

closes #6565

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#6573)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@gsklee
Copy link
Contributor

gsklee commented Mar 6, 2014

@SekibOmazic v1.2.x still supports IE8 so this probably will be a no-go. Any chance to implement it differently to take IE8 into account?

Query args will be removed from $location search object if they are passed in as null or undefined object properties

closes angular#6565
@SekibOmazic
Copy link
Contributor Author

@gsklee I've changed it to use for..in with hasOwnProperty() which will work with IE8.

@btford btford added the gh: PR label Mar 6, 2014
@gsklee
Copy link
Contributor

gsklee commented Mar 6, 2014

@SekibOmazic Looks great! =)

@gsklee
Copy link
Contributor

gsklee commented Mar 7, 2014

@SekibOmazic Just learned that v1.3 is on the way and might be hitting the road as soon as next week, which will dump IE8 support - so I guess you can disregard my previous footnote and revert back to the fancier implementation if you'd like to =)

@SekibOmazic
Copy link
Contributor Author

@gsklee Well, let the core team decide what is preferred solution. I can switch back to Object.keys() easily.

@IgorMinar
Copy link
Contributor

landed as 2c7d085
thanks!

@IgorMinar IgorMinar closed this Jul 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$location.search does not remove query args when pass in an object
6 participants