From 5b115ec7d5c9f32fd057699372a2f8ae80ef4f1e Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 14 Apr 2020 14:14:29 -0600 Subject: [PATCH] Try to avoid some errors loading nm by checking before setting --- api/js/etemplate/et2_extension_nextmatch_rowProvider.js | 4 ++-- api/js/etemplate/et2_extension_nextmatch_rowProvider.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch_rowProvider.js b/api/js/etemplate/et2_extension_nextmatch_rowProvider.js index 3ba0f14911..20b8773fe4 100644 --- a/api/js/etemplate/et2_extension_nextmatch_rowProvider.js +++ b/api/js/etemplate/et2_extension_nextmatch_rowProvider.js @@ -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++; diff --git a/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts b/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts index 57f25e3c52..b25449d5a2 100644 --- a/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts +++ b/api/js/etemplate/et2_extension_nextmatch_rowProvider.ts @@ -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 }