Thrift-1277: Node.js serializes false booleans as null

Client: js
Patch: Hans Duedal 

When serializing boolean types, false booleans are serialized as null instead of false switching to  using loose compare instead



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1197955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jake Farrell 2011-11-05 13:16:34 +00:00
parent 17b8469d16
commit 48bb0e2ad4

View File

@ -688,7 +688,7 @@ void t_js_generator::generate_js_struct_writer(ofstream& out,
indent(out) << "output.writeStructBegin('" << name << "');" << endl;
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
out << indent() << "if (this." << (*f_iter)->get_name() << ") {" << endl;
out << indent() << "if (this." << (*f_iter)->get_name() << " != null) {" << endl;
indent_up();
indent(out) <<