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) if (!currentView || running)
currentView = d currentView = d
if (running) { if (!running)
if (currentObject) { return
if ("node" in currentObject)
gotoNode(currentObject.node)
else if ("link" in currentObject)
gotoLink(currentObject.link)
saveState() saveState()
} else
console.log("reset view") if (!currentObject) {
resetView() resetView(false)
return
} }
if ("node" in currentObject)
gotoNode(currentObject.node)
if ("link" in currentObject)
gotoLink(currentObject.link)
} }
} }