Skip to content

Commit f09bb43

Browse files
committed
[FAB-15579] Fix doc for CommonIterator.next()
This fixes the explanation for CommonIterator.next() to be consistent with the actual behavior as follows: - next() no longer emits an event - next() does not reject when there is no more value, but resolves with an object { done: true } FAB-15579 (1 of 2) Change-Id: I94767af0767ae56d57cdc6b1b825822f8ae337cc Signed-off-by: Taku Shimosawa <taku.shimosawa@hal.hitachi.com>
1 parent 08dd598 commit f09bb43

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fabric-shim/lib/iterators.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ class CommonIterator {
7272
}
7373

7474
/**
75-
* Get the next value and return it through a promise and also emit
76-
* it if event listeners have been registered.
75+
* Get the next value and return it through a promise.
7776
* @async
78-
* @return {promise} a promise that is fulfilled with the next value or
79-
* is rejected otherwise
77+
* @return {promise} a promise that is fulfilled with an object { value: (next value) },
78+
* is fulfilled with an object { done: true } if there is no more value,
79+
* or is rejected if any error occurs.
8080
*/
8181
async next() {
8282
// check to see if there are some results left in the current result set

0 commit comments

Comments
 (0)