Skip to content

Commit

Permalink
don't display search params that are undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen von Takach committed Nov 21, 2013
1 parent 2ff886a commit 7be8fc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngRouteNames",
"version": "1.1.1",
"version": "1.1.2",
"main": "./ngRouteNames.js",
"dependencies": {
"angular": "~1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion ngRouteNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
index;

for (index in searchParams) {
if (searchParams.hasOwnProperty(index)) {
if (searchParams.hasOwnProperty(index) && searchParams[index] !== undefined) {
searchString += index + '=' + searchParams[index] + '&';
}
}
Expand Down

0 comments on commit 7be8fc3

Please sign in to comment.