From b5a8b73b1a242fc421e17a1e3b2eb3392865856c Mon Sep 17 00:00:00 2001 From: Tim Brandin Date: Thu, 18 Sep 2014 14:50:45 +0200 Subject: [PATCH] Need to check for client Otherwise this code will break server side routing. Gaaah ;) --- shared/router.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/router.coffee b/shared/router.coffee index e4db4d3f..f047e784 100644 --- a/shared/router.coffee +++ b/shared/router.coffee @@ -82,5 +82,5 @@ _.each Router.routes, (route)-> # Change the fromWhere session variable when you leave a path Router.onStop -> # If the route is an entry route, no need to save it - if (!_.contains(exclusions, Router.current().route.name)) + if (Meteor.isClient && !_.contains(exclusions, Router.current().route.name)) Session.set('fromWhere', Router.current().path)