Try to avoid some errors loading nm by checking before setting

This commit is contained in:
nathangray 2020-04-14 14:14:29 -06:00
parent 821c8474c5
commit 5b115ec7d5
2 changed files with 4 additions and 4 deletions

View File

@ -486,7 +486,7 @@ var et2_nextmatch_rowWidget = /** @class */ (function (_super) {
this._widgets[i] = _widgets[i].clone(this);
this._widgets[i].loadingFinished();
// Set column alignment from widget
if (this._widgets[i].align) {
if (this._widgets[i].align && this._row.childNodes[row_id]) {
this._row.childNodes[row_id].align = this._widgets[i].align;
}
row_id++;
@ -504,7 +504,7 @@ var et2_nextmatch_rowWidget = /** @class */ (function (_super) {
// Disabled columns might be missing widget - skip it
if (!this._widgets[i])
continue;
if (this._widgets[i] == _sender) {
if (this._widgets[i] == _sender && this._row.childNodes[row_id]) {
return this._row.childNodes[row_id].childNodes[0]; // Return the i-th td tag
}
row_id++;

View File

@ -625,7 +625,7 @@ class et2_nextmatch_rowWidget extends et2_widget implements et2_IDOMNode
this._widgets[i] = _widgets[i].clone(this);
this._widgets[i].loadingFinished();
// Set column alignment from widget
if(this._widgets[i].align)
if(this._widgets[i].align && this._row.childNodes[row_id])
{
this._row.childNodes[row_id].align = this._widgets[i].align;
}
@ -646,7 +646,7 @@ class et2_nextmatch_rowWidget extends et2_widget implements et2_IDOMNode
{
// Disabled columns might be missing widget - skip it
if(!this._widgets[i]) continue;
if(this._widgets[i] == _sender)
if(this._widgets[i] == _sender && this._row.childNodes[row_id])
{
return this._row.childNodes[row_id].childNodes[0]; // Return the i-th td tag
}