Commit c3d6626e authored by Julien Cigar's avatar Julien Cigar
Browse files

allow encoding of null and undefined values too

parent 80e0438a
......@@ -703,15 +703,21 @@
}
Yeti.Tools.Serializer.prototype._encodeValue = function(key, value) {
if (value !== undefined) {
switch (value.constructor) {
case Array:
this._encodeArray(key, value);
break;
default:
this._encodeString(key, value);
break;
}
switch (value) {
case null:
case undefined:
this._encodeString(key, value);
break;
default:
switch (value.constructor) {
case Array:
this._encodeArray(key, value);
break;
default:
this._encodeString(key, value);
break;
}
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment