From 6daf2e69f0f162a444ab224f73597ae9b61df512 Mon Sep 17 00:00:00 2001 From: unaffiliated Date: Sat, 21 Jan 2017 01:03:17 -0800 Subject: [PATCH] ignore state updates when on node Signed-off-by: Yoshua Wuyts Closes #390 --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ad1e724..e23b9c5 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,9 @@ function choo (opts) { var _routes = null var _frame = null - _store.use({ onStateChange: render }) + if (typeof window !== 'undefined') { + _store.use({ onStateChange: render }) + } _store.use(opts) start.toString = toString