Etemplate - fix undefined error if historylog was not initialized (usually due to no record ID)

This commit is contained in:
nathangray 2019-03-28 11:10:59 -06:00
parent 31b9c529b8
commit 566f853900

View File

@ -111,10 +111,17 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e
}
});
if (typeof e.data.history.dataview == "undefined") e.data.history.finishInit();
e.data.history.dynheight.update(function(_w, _h) {
e.data.history.dataview.resize(_w, _h);
});
if (typeof e.data.history.dataview == "undefined")
{
e.data.history.finishInit();
if(e.data.history.dynheight)
{
e.data.history.dynheight.update(function(_w, _h) {
e.data.history.dataview.resize(_w, _h);
});
}
}
};
tabs.tabData[i].flagDiv.bind("click.history",{"history": this, div: tabs.tabData[i].flagDiv}, handler);