Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

should support top level array for templates when not a collection #32

Merged
merged 1 commit into from
Feb 6, 2015

Conversation

Mortimerp9
Copy link
Contributor

when we want to "hardcode" a collection, the toplevel value of template is an array. However, Object.create will not make the right prototype and only return a bar object. We want to make sure to get an array back at the end.

@@ -32,7 +32,7 @@ var generate = function(req, res, next) {

} else {

var size = typeof service.size === 'function' ? service.size.apply(service, [params, query, body, cookies]) : service.size;
var size = _.isFunction(service.size) ? service.size.apply(service, [params, query, body, cookies]) : service.size;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is not related to the actual feature PR, but it was just to stick to the lodash test pattern.

@webpro webpro merged commit f102832 into webpro:master Feb 6, 2015
@webpro
Copy link
Owner

webpro commented Feb 6, 2015

Thanks @Mortimerp9! Just released as v0.4.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants