JS / getFData() : fixed bug permitting to support than method() return array of string
authorBenjamin Renard <brenard@easter-eggs.com>
Fri, 20 Jun 2014 11:38:25 +0000 (13:38 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Fri, 20 Jun 2014 11:38:25 +0000 (13:38 +0200)
public_html/includes/js/functions.js

index d9d6647..337775b 100644 (file)
@@ -78,6 +78,14 @@ function getFData(format,data,meth) {
         if ($type(ch)) {
           try {
             val=data[meth](ch[2]);
+            if ($type(val)=='array') {
+              if (val.length==0) {
+                val=''
+              }
+              else {
+                val=val[0];
+              }
+            }
           }
           catch(e) {
             LSdebug('getFData() : '+meth+'() -> rater');