From 53d6f290042fe4e55743fd21a8df44cd6895c3a9 Mon Sep 17 00:00:00 2001 From: peecky Date: Sun, 24 Aug 2014 18:22:22 +0900 Subject: [PATCH 1/2] fix typo --- lib/ber/writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ber/writer.js b/lib/ber/writer.js index c530830..67b959b 100644 --- a/lib/ber/writer.js +++ b/lib/ber/writer.js @@ -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; From 028ea6858e636e319cbe7a26374ee3aeaa4263f0 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 1 Jun 2020 09:20:44 -0500 Subject: [PATCH 2/2] use Array.isArray --- lib/ber/writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ber/writer.js b/lib/ber/writer.js index 0e9cae4..ca6400e 100644 --- a/lib/ber/writer.js +++ b/lib/ber/writer.js @@ -161,7 +161,7 @@ Writer.prototype.writeBuffer = function (buf, tag) { Writer.prototype.writeStringArray = function (strings) { - if (!(strings instanceof Array)) + if (!Array.isArray(strings)) throw new TypeError('argument must be an Array[String]'); var self = this;