markabrahams / node-asn1-ber

Generate and parse ASN.1 BER objects
7 stars 8 forks source link

Boolean logic error using `instanceof` in the `writeStringArray()` method in `lib/ber/writer.js` #9

Closed stephenwvickers closed 7 years ago

stephenwvickers commented 7 years ago

See: https://github.com/mcavage/node-asn1/pull/13

@@ -160,7 +160,7 @@ Writer.prototype.writeBuffer = function(buf, tag) {

  Writer.prototype.writeStringArray = function(strings) {
 -  if ((!strings instanceof Array))
 +  if (!(strings instanceof Array))
      throw new TypeError('argument must be an Array[String]');

    var self = this;
stephenwvickers commented 7 years ago

Original requester: @peecky