Extending options object in renderPartial #5

Merged
merged 1 commit into from Mar 13, 2014

2 participants

@pwalczyszyn

In the renderPartial function I changed _.defaults to _.extend. This fixes a problem of not being able to have different options in multiple file rendering setup.

@pwalczyszyn pwalczyszyn Extending options object in renderPartial
In the `renderPartial` function I changed _.defaults to _.extend. This fixes a problem of not being able to have different options in multiple file rendering setup.
3303ba6
@dwightjack
Owner

Was thinking the same thing, but i noticed that that way you're extending the main option object.

Wouldn't it be better to use an empty object as first argument? Also providing a default when data is not set would prevent errors:

_.extend({}, options, {filename: fpath}, data || {})
@pwalczyszyn
@dwightjack dwightjack merged commit 069fffc into dwightjack:master Mar 13, 2014
@dwightjack
Owner

Ok merged and added the fix. Pushed a new versione 0.2.5

@pwalczyszyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment