From d1cee692692a46a67e9efb6dca9037d19816b97b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 29 May 2012 22:26:52 +0000 Subject: [PATCH] Handle if row doesn't have cat_id in class --- etemplate/js/et2_extension_nextmatch_rowProvider.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch_rowProvider.js b/etemplate/js/et2_extension_nextmatch_rowProvider.js index fc66d1c512..99afa1ff2d 100644 --- a/etemplate/js/et2_extension_nextmatch_rowProvider.js +++ b/etemplate/js/et2_extension_nextmatch_rowProvider.js @@ -436,9 +436,16 @@ var et2_nextmatch_rowProvider = Class.extend({ if(_data["class"].indexOf("cat") !== -1 || classes.match(/[0-9]+/)) { cats = classes.match(/(cat_)?([0-9]+)/); - var invalid = typeof cats[1] == 'undefined'; - if(invalid) this._rootWidget.egw().debug("warn", "Invalid class '%s', prefixed with 'cat_'",cats[0]); - cats = [cats[2]]; + if(cats == null) + { + cats = ''; + } + else + { + var invalid = typeof cats[1] == 'undefined'; + if(invalid) this._rootWidget.egw().debug("warn", "Invalid class '%s', prefixed with 'cat_'",cats[0]); + cats = [cats[2]]; + } // Get category info if(!this.categories)