From 2c6d7ea7c3a6958823c7c0d9232e8708bc73390c Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Wed, 23 Oct 2013 15:32:20 -0700 Subject: [PATCH] Pass connection when requiring adaptors --- src/robot.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robot.coffee b/src/robot.coffee index d713f48..8c693c3 100644 --- a/src/robot.coffee +++ b/src/robot.coffee @@ -72,10 +72,10 @@ module.exports = class Robot @requireAdaptor = (adaptorName, connection) => if @adaptors[adaptorName]? if typeof @adaptors[adaptorName] is 'string' - @adaptors[adaptorName] = require(@adaptors[adaptorName]).adaptor(name: adaptorName) + @adaptors[adaptorName] = require(@adaptors[adaptorName]).adaptor(name: adaptorName, connection: connection) else require("cylon-#{adaptorName}").register(this) - @adaptors[adaptorName] = require("cylon-#{adaptorName}").adaptor(name: adaptorName) + @adaptors[adaptorName] = require("cylon-#{adaptorName}").adaptor(name: adaptorName, connection: connection) return @adaptors[adaptorName]