From 7b9b5efe7f7e726b10bdbf0eba3f9c2b447bbf6d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 9 Sep 2013 21:39:31 +0000 Subject: [PATCH] Apparently expandName() can also return null - handle that too --- etemplate/js/et2_widget_grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_grid.js b/etemplate/js/et2_widget_grid.js index 9adb77a362..ed15cf0aa5 100644 --- a/etemplate/js/et2_widget_grid.js +++ b/etemplate/js/et2_widget_grid.js @@ -253,13 +253,13 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], var ident = content.expandName(value); var regex = new RegExp("\\[" + content.perspectiveData.row + "\\]"); - if(ident.match(regex)) + if(ident != null && ident.match(regex)) { rowData[rowIndex] = jQuery.extend({}, rowDataEntry); content.perspectiveData.row = ++rowIndex; regex = new RegExp("\\[" + content.perspectiveData.row + "\\]"); } - } while(ident.match(regex)) + } while(ident != null && ident.match(regex)) return; } }