An issue in View.prototype.render manifested itself in a recent project: when View.prototype.redraw is called at the same time as View.prototype.render, and the stars align just right, View.prototype.el can end up unset at the time self.el.addClass(self.className); is called. Here's the relevant code in lavaca/mvc/View:
template
.render(model)
.success(promise.resolver())
.error(promise.rejector())
.then(function(html) {
if (self.className){
self.el.addClass(self.className);
}
});
The specific situation reads like this:
if (childView instanceof app.ui.views.**redacted view name**) {
childView.render();
childView.model.trigger('reset');
}
Where childView calls redraw on its model's "reset" event. Changing that to:
if (childView instanceof app.ui.views.**redacted view name**) {
childView.render().then(function() {
childView.model.trigger('reset');
});
}
Appears to have fixed the issue. Observed only on Android compiled so far.
An issue in
View.prototype.rendermanifested itself in a recent project: whenView.prototype.redrawis called at the same time asView.prototype.render, and the stars align just right,View.prototype.elcan end up unset at the timeself.el.addClass(self.className);is called. Here's the relevant code inlavaca/mvc/View:The specific situation reads like this:
Where
childViewcallsredrawon its model's"reset"event. Changing that to:Appears to have fixed the issue. Observed only on Android compiled so far.