Skip to content

Commit

Permalink
Merge pull request mean-expert-official#477 from dreamdevil00/develop…
Browse files Browse the repository at this point in the history
…ment

fix: angular2 sdk  remote method returns type check bug
  • Loading branch information
jonathan-casarrubias authored Aug 18, 2017
2 parents e1bd41b + b5de0bb commit 592a4ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/angular2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ module.exports = function generate(ctx) {
method.name.match(/(^createMany$|^find)/g) ||
(
typeof method.returns === 'object' &&
(method.returns.type === 'array' || Array.isArray(method.returns.type))
(String(method.returns.type).toLowerCase() === 'array' || Array.isArray(method.returns.type))
)
) type = `${model.name}[]`;
if (method.name.match(/(^create$|upsert|^findBy|^findOne$)/g)) type = model.name;
Expand Down

0 comments on commit 592a4ca

Please sign in to comment.