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 adapter;
console.log('name', name, 'settings', settings);
// support single settings object
if(typeof name === 'object') {
settings = name;
if(typeof name === 'object' && name.initialize) {
adapter = name;
name = undefined;
}
if(settings) {
if(settings && settings.initialize) {
adapter = settings.connector || settings.adapter;
}
if(settings.initialize) {