kahmali / meteor-restivus

REST APIs for the Best of Us! - A Meteor 0.9+ package for building REST APIs https://atmospherejs.com/nimble/restivus
MIT License
544 stars 116 forks source link

Buggy usage of _.extend for overriding default config #244

Open vladholubiev opened 7 years ago

vladholubiev commented 7 years ago

Merging provided constructor options with default one using _.extend leads to some unexpected behaviour.

When I create a constructor and want to provide only auth.token (without auth.user) _.extend will leave auth.user as undefined, therefore pretty all methods start throwing errors.

I believe using deep-extend here makes more sense.