Fix missing settings

This commit is contained in:
Ritchie 2013-06-14 14:22:51 -07:00
parent bf83a76eae
commit 473dd794ef
1 changed files with 5 additions and 3 deletions

View File

@ -117,12 +117,14 @@ DataSource.prototype.setup = function(name, settings) {
var schema = this; var schema = this;
var adapter; var adapter;
console.log('name', name, 'settings', settings);
// support single settings object // support single settings object
if(typeof name === 'object') { if(typeof name === 'object' && name.initialize) {
settings = name; adapter = name;
name = undefined; name = undefined;
} }
if(settings) { if(settings && settings.initialize) {
adapter = settings.connector || settings.adapter; adapter = settings.connector || settings.adapter;
} }
if(settings.initialize) { if(settings.initialize) {