Skip to content

Commit c5030c0

Browse files
committed
follow asyncIterator spec
1 parent e50c167 commit c5030c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = function graphqlGun(query, gun) {
106106
});
107107
const result = thunk.toPromiseFactory()();
108108
result.next = thunk.toPromiseFactory();
109-
result[Symbol.iterator] = function() {
109+
result[Symbol.asyncIterator] = function() {
110110
const factory = thunk.toPromiseFactory();
111111
return {
112112
next: () =>
@@ -116,5 +116,6 @@ module.exports = function graphqlGun(query, gun) {
116116
}))
117117
};
118118
};
119+
result[Symbol.iterator] = result[Symbol.asyncIterator]; // TODO: Depricate this usage
119120
return result;
120121
};

0 commit comments

Comments
 (0)