Return super in example Transport subclass (#980)

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.
This commit is contained in:
nathanmoon
2019-12-19 05:36:42 -07:00
committed by delvedor
parent b390193dcc
commit 9afca3dc8e

View File

@ -233,7 +233,7 @@ Sometimes you just need to inject a little snippet of your code and then continu
class MyTransport extends Transport {
request (params, options, callback) {
// your code
super.request(params, options, callback)
return super.request(params, options, callback)
}
}
----