router: another bugfix

This commit is contained in:
Nils Schneider 2015-07-07 00:30:35 +02:00
parent 2b3605a46e
commit 37c3278ded

View file

@ -122,18 +122,21 @@ define(function () {
if (!currentView || running)
currentView = d
if (running) {
if (currentObject) {
if ("node" in currentObject)
gotoNode(currentObject.node)
else if ("link" in currentObject)
gotoLink(currentObject.link)
if (!running)
return
saveState()
} else
console.log("reset view")
resetView()
saveState()
if (!currentObject) {
resetView(false)
return
}
if ("node" in currentObject)
gotoNode(currentObject.node)
if ("link" in currentObject)
gotoLink(currentObject.link)
}
}