Cluster.query using callback as second argument broken since 3.2.0

Handling of callback as second argument in cluster.query is broken since 3.2.0. The statement argument is used as callback instead options.
see https://github.com/couchbase/couchnode/blob/7d6a9b6e297fbc782f57ccfed70434e5ef604da2/lib/cluster.ts#L310

actually this line should be either callback = arguments[1] or callback = options.

In 3.1.3 this was correct: https://github.com/couchbase/couchnode/blob/97178ac6a1f8d44f3aba421edf4364669fa9bc7c/lib/cluster.js#L347

Thank you @Flarna for pointing this, an issue has been created https://issues.couchbase.com/browse/JSCBC-945

Hey @Flarna,

Thanks for reporting this issue! We’ve resolved this for the upcoming 3.2.2 release which should be out later today.

Cheers, Bret

Hello 3.2.2 was released today and should fix the callback issue.

Thanks! Yes, seems problem is solved

1 Like