Fix toString remove last letter in href (#559)
This commit is contained in:
committed by
Yoshua Wuyts
parent
41e4697af9
commit
fccb408a8c
@@ -187,7 +187,7 @@ Choo.prototype.toString = function (location, state) {
|
|||||||
assert.equal(typeof location, 'string', 'choo.toString: location should be type string')
|
assert.equal(typeof location, 'string', 'choo.toString: location should be type string')
|
||||||
assert.equal(typeof this.state, 'object', 'choo.toString: state should be type object')
|
assert.equal(typeof this.state, 'object', 'choo.toString: state should be type object')
|
||||||
|
|
||||||
this.state.href = location.replace(/\?*.$/, '')
|
this.state.href = location.replace(/\?.+$/, '')
|
||||||
this.state.query = nanoquery(location)
|
this.state.query = nanoquery(location)
|
||||||
var html = this.router(location)
|
var html = this.router(location)
|
||||||
assert.ok(html, 'choo.toString: no valid value returned for the route ' + location)
|
assert.ok(html, 'choo.toString: no valid value returned for the route ' + location)
|
||||||
|
|||||||
Reference in New Issue
Block a user