From 668dc7c6d2acf6c4c5f950e5173f69d02f00a0ac Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 12 Aug 2008 00:12:10 +0000 Subject: [PATCH] Fixed js error when defaultAction isn't set git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60446 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/ComplexTableField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ComplexTableField.js b/javascript/ComplexTableField.js index 3afe079ae..365870d5b 100755 --- a/javascript/ComplexTableField.js +++ b/javascript/ComplexTableField.js @@ -14,7 +14,7 @@ ComplexTableField.prototype = { rules['#'+this.id+' table.data tbody td'] = {onclick: this.openPopup.bind(this)}; // invoke row action-link based on default-action set in classname - if(defaultAction) { + if(typeof defaultAction != 'undefined' && defaultAction) { rules['#'+this.id+' table.data tbody td'] = { onclick: function(e) { var link = $$('.'+defaultAction, Event.element(e).parentNode)[0].getAttribute('href');