start: throw err for render races

This commit is contained in:
Yoshua Wuyts
2016-05-31 15:54:46 +02:00
parent 7f66f7d4dc
commit 3749ffb477
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -163,6 +163,7 @@ function choo () {
function onchange (action, newState, oldState) {
if (newState === oldState) return
const oldTree = document.querySelector('#' + rootId)
assert.ok(oldTree, "Could not find DOM node '#" + rootId + "' to update")
const newTree = _router(newState.app.location, newState, send, oldState)
newTree.setAttribute('id', rootId)
yo.update(oldTree, newTree)