From 2b3605a46e44b4f31298f2316b89495f06b4a52d Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Tue, 7 Jul 2015 00:20:34 +0200 Subject: [PATCH] router: another bugfix --- lib/router.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/router.js b/lib/router.js index cab7571..5956b27 100644 --- a/lib/router.js +++ b/lib/router.js @@ -119,21 +119,20 @@ define(function () { if (d in views) { views[d]() - if (!currentView) + if (!currentView || running) currentView = d if (running) { - if (currentObject) + if (currentObject) { if ("node" in currentObject) gotoNode(currentObject.node) else if ("link" in currentObject) gotoLink(currentObject.link) - else - targets.forEach( function (t) { - t.resetView() - }) - saveState() + saveState() + } else + console.log("reset view") + resetView() } } }