* luci/libs: util: little bugfix in serialize_data()

This commit is contained in:
Jo-Philipp Wich 2008-08-28 16:44:10 +00:00
parent 33ef3a1da2
commit af2cce3839

View file

@ -456,7 +456,7 @@ function _serialize_table(t, seen)
idata = idata .. ( #idata > 0 and ", " or "" ) .. v
end
return idata .. ( #data > 0 and ", " or "" ) .. data
return idata .. ( #data > 0 and #idata > 0 and ", " or "" ) .. data
end
--- Recursively serialize given data to lua code, suitable for restoring