Void values are normally represented as 'null', so ignoring 'null' fields is wrong.

This commit is contained in:
Kenton Varda committed 2016-02-09 18:34:04 -08:00
1 parent e999e82d46
commit 133c15771b
1 file changed
+1 -1
+1 -1
View File
@@ -1454,7 +1454,7 @@ struct FromJsConverter {
bool fieldFromJs(capnp::DynamicStruct::Builder builder, capnp::StructSchema::Field field,
v8::Handle<v8::Value> js) {
if (js->IsNull() || js->IsUndefined()) {
if ((js->IsNull() || js->IsUndefined()) && !field.getType().isVoid()) {
return true;
}
auto proto = field.getProto();