2way-router
Advanced tools
Comparing version 1.2.5 to 1.3.0
@@ -80,6 +80,7 @@ /** | ||
RouteParams.prototype.merge = function () { | ||
var result = {}, name; | ||
var result = {}, values; | ||
for (name in this.queryParams) { | ||
if (this.queryParams.hasOwnProperty(name)) { | ||
result[name] = this.queryParams[name]; | ||
if (this.queryParams.hasOwnProperty(name) && this.queryParams[name].length > 0) { | ||
values = this.queryParams[name]; | ||
result[name] = values[values.length - 1]; | ||
} | ||
@@ -86,0 +87,0 @@ } |
{ | ||
"name": "2way-router", | ||
"version": "1.2.5", | ||
"version": "1.3.0", | ||
"description": "2-way router", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -117,5 +117,5 @@ /*global describe, xdescribe, it, expect*/ | ||
expectRouteWithParams(router.findRoute("/news/page/205/?a=1&a=3&b=2&c"), routeA, { | ||
a: [ '1', '3' ], | ||
b: [ '2' ], | ||
c: [ '' ], | ||
a: '3', | ||
b: '2', | ||
c: '', | ||
page: 205 | ||
@@ -122,0 +122,0 @@ }, done); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38284
981