Etemplate: Fix history widget lost some widgets when converted to TypeScript

This commit is contained in:
nathangray 2020-06-16 10:58:03 -06:00
parent b56a8f9901
commit 31f20d9783
2 changed files with 2 additions and 2 deletions

View File

@ -428,7 +428,7 @@ var et2_historylog = /** @class */ (function (_super) {
value = _data['share_email'];
}
// Get widget from list, unless it needs a diff widget
if (typeof widget == 'undefined' && typeof self.fields[_data.status] != 'undefined' && (i < et2_historylog.NEW_VALUE ||
if ((typeof widget == 'undefined' || widget == null) && typeof self.fields[_data.status] != 'undefined' && (i < et2_historylog.NEW_VALUE ||
i >= et2_historylog.NEW_VALUE && (self.fields[_data.status].nodes || !self._needsDiffWidget(_data['status'], _data[et2_historylog.columns[et2_historylog.OLD_VALUE].id])))) {
widget = self.fields[_data.status].widget;
if (!widget._children.length) {

View File

@ -592,7 +592,7 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
value = _data['share_email'];
}
// Get widget from list, unless it needs a diff widget
if(typeof widget == 'undefined' && typeof self.fields[_data.status] != 'undefined' && (
if((typeof widget == 'undefined' || widget == null) && typeof self.fields[_data.status] != 'undefined' && (
i < et2_historylog.NEW_VALUE ||
i >= et2_historylog.NEW_VALUE && (
self.fields[_data.status].nodes || !self._needsDiffWidget(_data['status'], _data[et2_historylog.columns[et2_historylog.OLD_VALUE].id])