Skip to content
Snippets Groups Projects
Commit a8052c7f authored by murgatroid99's avatar murgatroid99
Browse files

Correct use of ProtoBuf.js 6 message encoding API

parent 7fb2129c
No related branches found
No related tags found
No related merge requests found
......@@ -77,11 +77,7 @@ exports.serializeCls = function serializeCls(cls) {
* @return {Buffer} The serialized object
*/
return function serialize(arg) {
var errMsg = cls.verify(arg);
if (errMsg) {
throw Error(errMsg);
}
var message = cls.create(arg);
var message = cls.fromObject(arg);
return cls.encode(message).finish();
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment