restful-goose
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -91,3 +91,3 @@ var express = require('express'); | ||
// We don't want to assign the relationship to the object if it's an empty array | ||
if (Array.isArray(rel[resourceName].data) && rel[resourceName].data.length === 0) { | ||
if ((Array.isArray(rel[resourceName].data) === false && !rel[resourceName].data.id) || (Array.isArray(rel[resourceName].data) && rel[resourceName].data.length === 0)) { | ||
return; | ||
@@ -94,0 +94,0 @@ } |
{ | ||
"name": "restful-goose", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Yet another RESTful microservice generator for Mongoose with an emphasis on flexibility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
63134