Skip to content

Commit

Permalink
Return super in example Transport subclass (#980)
Browse files Browse the repository at this point in the history
If called without a callback, the request method returns a Promise, so
when calling into super.request, the result should be returned to
maintain promise behavior.
  • Loading branch information
nathanmoon authored and delvedor committed Dec 19, 2019
1 parent 01e045f commit 59559f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ use the usual client code. In such cases, call `super.method`:
class MyTransport extends Transport {
request (params, options, callback) {
// your code
super.request(params, options, callback)
return super.request(params, options, callback)
}
}
----
Expand Down

0 comments on commit 59559f7

Please sign in to comment.