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) {
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()
} else
console.log("reset view")
resetView()
}
}
}