warn on unmount (#485)
This commit is contained in:
@@ -57,6 +57,7 @@ function Choo (opts) {
|
||||
}
|
||||
var newTree = router(createLocation())
|
||||
tree = nanomorph(tree, newTree)
|
||||
assert.notEqual(tree, newTree, 'choo.start: a different node type was returned as the root node on a rerender. Make sure that the root node is always the same type to prevent the application from being unmounted.')
|
||||
if (hasPerformance && timingEnabled) {
|
||||
window.performance.mark('choo:renderEnd')
|
||||
window.performance.measure('choo:render', 'choo:renderStart', 'choo:renderEnd')
|
||||
|
||||
Reference in New Issue
Block a user