[Pkg-javascript-commits] [node-leveldown] 74/492: fix deferred batch: !isOpen() && !isClosed()

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:46 UTC 2014


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

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit c99956d3e03392bc2bd513c8f1a48ed6ab27c1e4
Author: Rod Vagg <rod at vagg.org>
Date:   Sun Nov 18 12:36:25 2012 +1100

    fix deferred batch: !isOpen() && !isClosed()
---
 lib/levelup.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/levelup.js b/lib/levelup.js
index dd418d6..496dbdf 100644
--- a/lib/levelup.js
+++ b/lib/levelup.js
@@ -220,7 +220,7 @@ LevelUP.prototype = {
   , batch: function (arr, options_, callback_) {
       var callback, options, keyEncoding, valueEncoding, err
 
-      if (!this.isOpen()) {
+      if (!this.isOpen() && !this.isClosed()) {
         return this.once('ready', function () {
           this.batch(arr, options_, callback_)
         })

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



More information about the Pkg-javascript-commits mailing list