Use forIn to ensure Object iteration is performed

This commit is contained in:
Andrew Stewart 2014-12-17 16:31:26 -08:00
parent 919a54540f
commit 6ebbdf0eab
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ module.exports = function Connection(opts) {
var adaptor = module.adaptor(opts);
_.forEach(adaptor, function(prop, name) {
_.forIn(adaptor, function(prop, name) {
if (name === "constructor") {
return;
}
@ -56,7 +56,7 @@ module.exports = function Connection(opts) {
if (testMode()) {
var testAdaptor = Registry.findByAdaptor("test").adaptor(opts);
_.forEach(adaptor, function(prop, name) {
_.forIn(adaptor, function(prop, name) {
if (_.isFunction(prop) && !testAdaptor[name]) {
testAdaptor[name] = function() { return true; };
}

View File

@ -44,7 +44,7 @@ module.exports = function Device(opts) {
var driver = module.driver(opts);
_.forEach(driver, function(prop, name) {
_.forIn(driver, function(prop, name) {
if (name === "constructor") {
return;
}
@ -57,7 +57,7 @@ module.exports = function Device(opts) {
if (testMode()) {
var testDriver = Registry.findByDriver("test").driver(opts);
_.forEach(driver, function(prop, name) {
_.forIn(driver, function(prop, name) {
if (_.isFunction(prop) && !testDriver[name]) {
testDriver[name] = function() { return true; };
}