diff --git a/src/router.js b/src/router.js index fada390..2b94200 100644 --- a/src/router.js +++ b/src/router.js @@ -158,7 +158,7 @@ module.exports = function (source) { _embed.forEach(function (otherResource) { if (otherResource && otherResource.trim().length > 0) { // Skip non-existent collections - if (!db.object[otherResource]) return; + if (!db.object[otherResource]) return var query = {} query[req.params.resource + 'Id'] = req.params.id resource[otherResource] = db(otherResource).where(query)