[Pkg-javascript-commits] [node-asn1.js] 109/202: buffer: fix regression in EncoderBuffer

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:18:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-asn1.js.

commit 6142edda0f4a75e407844cf1fd7e6d1665eef47b
Author: Fedor Indutny <fedor at indutny.com>
Date:   Thu Jun 11 13:25:50 2015 +0200

    buffer: fix regression in EncoderBuffer
    
    Fix: #43
---
 lib/asn1/base/buffer.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/asn1/base/buffer.js b/lib/asn1/base/buffer.js
index 186efb2..bc826e8 100644
--- a/lib/asn1/base/buffer.js
+++ b/lib/asn1/base/buffer.js
@@ -66,7 +66,7 @@ function EncoderBuffer(value, reporter) {
   if (Array.isArray(value)) {
     this.length = 0;
     this.value = value.map(function(item) {
-      if (!item || item.constructor.name !== 'EncoderBuffer')
+      if (!(item instanceof EncoderBuffer))
         item = new EncoderBuffer(item, reporter);
       this.length += item.length;
       return item;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-asn1.js.git



More information about the Pkg-javascript-commits mailing list