Permalink
Browse files

Merge pull #33 with refinements

  • Loading branch information...
1 parent 3102186 commit c66bf7a953e4514ce18645b71d9bd9a2062d21aa @my8bird committed Jul 13, 2012
Showing with 4 additions and 5 deletions.
  1. +1 −1 package.json
  2. +1 −1 src/coffee/index.coffee
  3. +1 −3 src/coffee/leveldb/iterator.coffee
  4. +1 −0 test/package-test.coffee
View
@@ -6,7 +6,7 @@
],
"description": "Bindings for using LevelDB through node.",
"homepage": "https://github.com/my8bird/node-leveldb",
- "version": "0.6.3",
+ "version": "0.6.4",
"main": "lib",
"engines": {
"node": "~0.6.x"
View
@@ -1,7 +1,7 @@
leveldb = exports = module.exports = require './leveldb/handle'
binding = require './leveldb.node'
-leveldb.version = '0.6.2'
+leveldb.version = '0.6.4'
leveldb.bindingVersion = "#{binding.majorVersion}.#{binding.minorVersion}"
leveldb.Batch = require('./leveldb/batch').Batch
@@ -112,8 +112,6 @@ exports.Iterator = class Iterator
#Optional finished callback
if typeof(args[args.length - 1]) is 'function' and typeof(args[args.length - 2]) is 'function'
finishedCallback = args.pop()
- else
- finishedCallback = ->{}
# required callback
callback = args.pop()
@@ -139,7 +137,7 @@ exports.Iterator = class Iterator
callback null, @_getKey(options), @_getVal(options)
if not limit or limit isnt @_key.toString 'binary'
@next next
- else
+ else if finishedCallback
finishedCallback()
# start loop
View
@@ -12,3 +12,4 @@ describe 'package', ->
it 'should have binding version', () ->
assert.equal leveldb.bindingVersion, bindingVersion
+

0 comments on commit c66bf7a

Please sign in to comment.