Skip to content

Commit c48c952

Browse files
author
Nighelles
committed
Clarifying eachAsync error message for #5931
OTS by @danielmewes
1 parent 3bab183 commit c48c952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cursor.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ class IterableResult
278278
doneChecking = true
279279
return ret
280280
.then (data) ->
281-
return data if data is undefined or typeof data is Promise
282-
throw new error.ReqlDriverError "Row handler for eachAsync may only return a Promise or undefined."
281+
return data if data is undefined
282+
throw new error.ReqlDriverError "Row handler for eachAsync may only return undefined, or a Promise that resolves to undefined."
283283
nextCb = =>
284284
if @_closeCbPromise?
285285
return Promise.resolve().then (data) ->

0 commit comments

Comments
 (0)