bugfix for array with single element

This commit is contained in:
AJ ONeal 2015-12-19 17:40:52 -08:00
parent 49c5af0c52
commit ded286de61
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,11 @@ function toPyVal(val) {
return val;
}
else if (Array.isArray(val)) {
return val.join(',');
val = val.join(',');
if (-1 === val.indexOf(',')) {
val += ','; // disambguates value from array with one element
}
return val;
}
return val && JSON.stringify(val);