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 @@ ...@@ -703,15 +703,21 @@
} }
Yeti.Tools.Serializer.prototype._encodeValue = function(key, value) { Yeti.Tools.Serializer.prototype._encodeValue = function(key, value) {
if (value !== undefined) { switch (value) {
switch (value.constructor) { case null:
case Array: case undefined:
this._encodeArray(key, value); this._encodeString(key, value);
break; break;
default: default:
this._encodeString(key, value); switch (value.constructor) {
break; 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