From b23183137ea133235abda79a6389f70f6bc501f1 Mon Sep 17 00:00:00 2001 From: LOUIS Date: Thu, 27 Jul 2017 03:32:05 +1000 Subject: [PATCH] fix .toString() state (#531) (#533) * fix .toString() state (#531) * updated .toString() state fix (#531) * updated .toString() state fix (#531) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2874850..7d14e30 100644 --- a/index.js +++ b/index.js @@ -177,7 +177,7 @@ Choo.prototype.mount = function mount (selector) { } 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.equal(typeof location, 'string', 'choo.toString: location should be type string')