Fix up API errors
This commit is contained in:
parent
ce87a355f0
commit
39f9c8b637
|
@ -44,6 +44,10 @@ module.exports = function Connection(opts) {
|
|||
var adaptor = module.adaptor(opts);
|
||||
|
||||
for (var prop in adaptor) {
|
||||
if (~['constructor'].indexOf(prop)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof adaptor[prop] === 'function') {
|
||||
adaptor[prop] = adaptor[prop].bind(adaptor);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,10 @@ module.exports = function Device(opts) {
|
|||
var driver = module.driver(opts);
|
||||
|
||||
for (var prop in driver) {
|
||||
if (~['constructor'].indexOf(prop)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof driver[prop] === 'function') {
|
||||
driver[prop] = driver[prop].bind(driver);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue