router: another bugfix

This commit is contained in:
Nils Schneider 2015-07-07 00:20:34 +02:00
parent 8bbad8e1d5
commit 2b3605a46e

View File

@ -119,21 +119,20 @@ define(function () {
if (d in views) { if (d in views) {
views[d]() views[d]()
if (!currentView) if (!currentView || running)
currentView = d currentView = d
if (running) { if (running) {
if (currentObject) if (currentObject) {
if ("node" in currentObject) if ("node" in currentObject)
gotoNode(currentObject.node) gotoNode(currentObject.node)
else if ("link" in currentObject) else if ("link" in currentObject)
gotoLink(currentObject.link) gotoLink(currentObject.link)
else
targets.forEach( function (t) {
t.resetView()
})
saveState() saveState()
} else
console.log("reset view")
resetView()
} }
} }
} }