Preserve arrays

This commit is contained in:
James Allen 2014-04-03 11:14:28 +01:00
parent 4f377c5fa2
commit 0da921311c

View file

@ -4,7 +4,7 @@ env = (process.env.NODE_ENV or "development").toLowerCase()
merge = (settings, defaults) ->
for key, value of settings
if typeof(value) == "object"
if typeof(value) == "object" and value not instanceof Array
defaults[key] = merge(settings[key], defaults[key] or {})
else
defaults[key] = value