#551 don't destroy root if forced synchronous redraw

This commit is contained in:
Leo Horie 2015-04-13 23:04:04 -04:00
parent 4d03595bb1
commit f0f1e88170
2 changed files with 74 additions and 1 deletions

View file

@ -241,7 +241,7 @@ var m = (function app(window, undefined) {
var controllerIndex = cached.controllerConstructors ? cached.controllerConstructors.indexOf(controllerConstructor) : -1
var controller = controllerIndex > -1 ? cached.controllers[controllerIndex] : new (data.controller || function() {})
var key = data && data.attrs && data.attrs.key
data = pendingRequests == 0 ? data.view(controller) : {tag: "placeholder"}
data = pendingRequests == 0 || cached ? data.view(controller) : {tag: "placeholder"}
if (key) {
if (!data.attrs) data.attrs = {}
data.attrs.key = key