From d8fb0c8bee38140d84c06c2a2f28935d616e2b1b Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 24 Jan 2020 05:58:15 -0700 Subject: [PATCH] Fix undefined error looking up cell content --- api/js/etemplate/et2_widget_grid.js | 5 +++-- api/js/etemplate/et2_widget_grid.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_widget_grid.js b/api/js/etemplate/et2_widget_grid.js index d01c9b7628..d3b7243564 100644 --- a/api/js/etemplate/et2_widget_grid.js +++ b/api/js/etemplate/et2_widget_grid.js @@ -414,8 +414,9 @@ var et2_grid = /** @class */ (function (_super) { for (var name in this.getArrayMgrs()) { //this.getArrayMgr(name).perspectiveData.row = y; } - if (this._getCell(cells, x, y).rowData.id) { - this.getArrayMgr("content").expandName(this.rowData[y].id); + var cell = this._getCell(cells, x, y); + if (cell.rowData.id) { + this.getArrayMgr("content").expandName(cell.rowData.id); } // If row disabled, just skip it var disabled = false; diff --git a/api/js/etemplate/et2_widget_grid.ts b/api/js/etemplate/et2_widget_grid.ts index 096c760fc4..11c55c7b56 100644 --- a/api/js/etemplate/et2_widget_grid.ts +++ b/api/js/etemplate/et2_widget_grid.ts @@ -572,9 +572,10 @@ export class et2_grid extends et2_DOMWidget implements et2_IDetachedDOM, et2_IAl //this.getArrayMgr(name).perspectiveData.row = y; } - if(this._getCell(cells, x,y).rowData.id) + let cell = this._getCell(cells, x,y); + if(cell.rowData.id) { - this.getArrayMgr("content").expandName(this.rowData[y].id); + this.getArrayMgr("content").expandName(cell.rowData.id); } // If row disabled, just skip it let disabled = false;