Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zohararad/sails-rest
Browse files Browse the repository at this point in the history
  • Loading branch information
zohararad committed Apr 9, 2016
2 parents 3a4f393 + 81e1d41 commit 1dfd143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module.exports.connections = {
adapter: 'sails-rest',
host: 'localhost:8080', // api host
protocol: 'http', // api HTTP protocol
pathname: '' // api endpoint path name
headers: {}, // Optional HTTP headers
pathname: '', // api endpoint path name
headers: {}, // Optional HTTP headers
hooks: {
merge: true, // flag that indicates whether or not to merge build-in hooks with user-provided hooks
before: [], // array of hook functions that run before a request
Expand Down
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Connection.find = function (connection, collection, options, cb) {
}
// Waterline requires that `find` will return an array.
// Here we ensure that response body is converted to an array if required.
if(!err && !_.isEmpty(res.body)){
if(!err){
if(!Array.isArray(res.body)){
res.body = [res.body];
}
Expand Down

0 comments on commit 1dfd143

Please sign in to comment.