diff options
-rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php index 4dce8e2e..d26d243a 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -158,9 +158,12 @@ class TJavaScript {
foreach($value as $k=>$v)
{
- if($results!=='')
- $results.=',';
- $results.="'$k':".self::encode($v,$toMap);
+ if($v!=='')
+ {
+ if($results!=='')
+ $results.=',';
+ $results.="'$k':".self::encode($v,$toMap);
+ }
}
return '{'.$results.'}';
}
@@ -168,9 +171,12 @@ class TJavaScript {
foreach($value as $v)
{
- if($results!=='')
- $results.=',';
- $results.=self::encode($v,$toMap);
+ if($v!=='')
+ {
+ if($results!=='')
+ $results.=',';
+ $results.=self::encode($v,$toMap);
+ }
}
return '['.$results.']';
}
|