balderdashy/sails — pull request #76 by techpines (2012-12-18 15:35:55+00:00)
Title: Extend function seemed to be problematic!  Causin issue with Session config.

So it looks like the session configuration issues were cause by the "_.recursive.extend" function in "lib/util.js".

This function was being used here in "lib/common.js":

```javascript
sails.config = _.recursive.extend(configuration.defaults(userConfig), userConfig || {});
```

I copied and pasted the jQuery extend function from the jQuery code base. I think it does what you need. Here's the docs on how it works:

http://api.jquery.com/jQuery.extend/