Skip to content

Commit

Permalink
Merge pull request #26894 from saiprakash-v/sdd-url-reset
Browse files Browse the repository at this point in the history
ICDS Dashboard: removing additional request params added to url after request completion
  • Loading branch information
czue authored Mar 19, 2020
2 parents 2faa5ec + 85e6e89 commit 4980bc0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ function ServiceDeliveryDashboardController($rootScope, $scope, $http, $location
// end mobile helpers

vm.getData = function () {
var requestParams = $location.search();
// If $location.search() is directly assigned to requestParams variable, It is assigned along with reference.
// So, any change made to requestParams will be reflected in $location also (affecting the url). To avoid this,
// we are deep cloning the object ($location.search()) before assigning it to request params
var requestParams = JSON.parse(JSON.stringify($location.search()));
if (isMobile) {
var mobileCustomParams = vm.getMobileCustomParams();
for(var k in mobileCustomParams) {
Expand Down

0 comments on commit 4980bc0

Please sign in to comment.