We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 985d788 + 1d05f93 commit ec447f9Copy full SHA for ec447f9
lib/binarypack.js
@@ -300,7 +300,7 @@ Packer.prototype.pack = function(value){
300
} else {
301
this.pack_bin(value.buffer);
302
}
303
- } else if (constructor == Object){
+ } else if ((constructor == Object) || (constructor.toString().startsWith('class'))){
304
this.pack_object(value);
305
} else if (constructor == Date){
306
this.pack_string(value.toString());
0 commit comments