dennismonsewicz / hapi-knex-builder

4 stars 0 forks source link

Error when server.settings.app is undefined #1

Open seanwash opened 8 years ago

seanwash commented 8 years ago

Hey there,

I'd be happy to submit a PR for this if you think it's worth it.

Basically, I'm not using glue to setup my configs like the example you created (Im still pretty new to Hapi), so I didn't add the app key to server.settings when I set it up. It only took me a few minutes to debug, but _.extend doesn't work when one of the options passed in is undefined (in this case server.settings.app). It could be useful to throw an error unless both options and server.settings.app are both defined. Let me know and I can throw up a PR for you.

P.s. thanks for the plugin!

dennismonsewicz commented 8 years ago

Howdy!! I would love a PR! I think it's totally worth adding in, especially if the issue could be affecting someone else.

Glad you're liking the plugin! Let me know if there are any other improvements, issues you see that need to be fixed. I know I need to get the plugin up to speed with ES6