Make sure callback is there before trying to call it. If the template changes before the timeout fires, it might not be.

This commit is contained in:
Nathan Gray 2013-10-09 13:07:29 +00:00
parent fde83c834e
commit d22489e23b

View File

@ -791,7 +791,11 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange,
{
var self = this;
window.setTimeout(function() {
self._callback.call(self._context, idxStart, idxEnd);
// If row template changes, self._callback might disappear
if(typeof self._callback != "undefined")
{
self._callback.call(self._context, idxStart, idxEnd);
}
}, 0);
}
}