[Pkg-javascript-commits] [node-cipher-base] 04/13: fix break in node 8

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 12 21:30:56 UTC 2017


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

rouca pushed a commit to branch master
in repository node-cipher-base.

commit ef8845700ef0d3852aadbf9924eaf7385981f5c7
Author: Calvin Metcalf <cmetcalf at appgeo.com>
Date:   Wed Jul 5 09:05:53 2017 -0400

    fix break in node 8
---
 index.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 1a661d6..a6fe528 100644
--- a/index.js
+++ b/index.js
@@ -11,6 +11,10 @@ function CipherBase (hashMode) {
   } else {
     this.final = this._finalOrDigest
   }
+  if (this._final) {
+    this.__final = this._final
+    this._final = null
+  }
   this._decoder = null
   this._encoding = null
 }
@@ -59,7 +63,7 @@ CipherBase.prototype._transform = function (data, _, next) {
 CipherBase.prototype._flush = function (done) {
   var err
   try {
-    this.push(this._final())
+    this.push(this.__final())
   } catch (e) {
     err = e
   } finally {
@@ -67,7 +71,7 @@ CipherBase.prototype._flush = function (done) {
   }
 }
 CipherBase.prototype._finalOrDigest = function (outputEnc) {
-  var outData = this._final() || new Buffer('')
+  var outData = this.__final() || new Buffer('')
   if (outputEnc) {
     outData = this._toString(outData, outputEnc, true)
   }

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



More information about the Pkg-javascript-commits mailing list