When getting values from the form, especially in a JSONMap,
some objects may be nested, and as such, it's not much use
to return '[object Object]'. Return the object instead, so
the caller can do something useful with it. This makes
multidimensional maps much easier to use.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
if (Array.isArray(value))
return value;
+ if (L.isObject(value))
+ return value;
+
if (value != null)
return String(value);
delete this.data[section][option];
else if (Array.isArray(value))
this.data[section][option] = value;
+ else if (L.isObject(value))
+ this.data[section][option] = value;
else
this.data[section][option] = String(value);
},