fix .toString() state (#531) (#533)

* fix .toString() state (#531)

* updated .toString() state fix (#531)

* updated .toString() state fix (#531)
This commit is contained in:
LOUIS
2017-07-26 19:32:05 +02:00
committed by Yoshua Wuyts
parent 9c8c5b3c85
commit b23183137e
+1 -1
View File
@@ -177,7 +177,7 @@ Choo.prototype.mount = function mount (selector) {
} }
Choo.prototype.toString = function (location, state) { Choo.prototype.toString = function (location, state) {
this.state = xtend({ events: xtend(this._events) }, this.state || {}) this.state = xtend(this.state, state || {})
assert.notEqual(typeof window, 'object', 'choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser') assert.notEqual(typeof window, 'object', 'choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser')
assert.equal(typeof location, 'string', 'choo.toString: location should be type string') assert.equal(typeof location, 'string', 'choo.toString: location should be type string')