From e46e351b9d164714a7a3d38411885c268bbbe75b Mon Sep 17 00:00:00 2001 From: Klaus Trainer Date: Wed, 19 Oct 2016 22:13:22 +0200 Subject: [PATCH] fix: use `once` listener --- iterator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iterator.js b/iterator.js index 6eba902..e04a51e 100644 --- a/iterator.js +++ b/iterator.js @@ -14,7 +14,7 @@ function DynamoDBIterator (db, options) { this.db = db this.dynamoDb = db.dynamoDb this._results = this.createReadStream(options) - this._results.on('end', () => { + this._results.once('end', () => { this._endEmitted = true }) }