Rico Bugfix: Prevent translation error
authorJoey Schulze <joey@infodrom.org>
Mon, 24 Feb 2014 18:49:41 +0000 (19:49 +0100)
committerJoey Schulze <joey@infodrom.org>
Mon, 24 Feb 2014 18:49:41 +0000 (19:49 +0100)
lib/rico/ricoLiveGridForms.js

index 2b12135..ace80ef 100644 (file)
@@ -605,7 +605,7 @@ Rico.TableEdit = Class.create(
   processResponse: function() {
     var responseText,success=true;
     var respNodes=Element.select(this.responseDiv,'.ricoFormResponse');
-    if (respNodes) {
+    if (respNodes && respNodes.length) {
       // generate a translated response
       var phraseId=$w(respNodes[0].className)[1];
       responseText=RicoTranslate.getPhraseById(phraseId,this.options.RecordName);