Comparing version 1.3.1 to 1.3.2
@@ -187,5 +187,6 @@ 'use strict'; | ||
} | ||
// console.log({flattened}) | ||
if (flattened[`${ ref.path }.ref`]) { | ||
let name = pluralize(flattened[`${ref.path}.ref`]); | ||
let toPopulate = collections.filter(collection => collection.name === name)[0]; | ||
let name = pluralize(flattened[`${ref.path}.ref`]).toLowerCase(); | ||
let toPopulate = collections.filter(collection => collection.name.toLowerCase() === name)[0]; | ||
let _id = flattenedDoc[ref.path]; | ||
@@ -198,4 +199,5 @@ if (_id) { | ||
let reference = flattened[refpath]; | ||
let name = pluralize(reference); | ||
let toPopulate = collections.filter(collection => collection.name === name)[0]; | ||
let name = pluralize(reference).toLowerCase(); | ||
let toPopulate = collections.filter(collection => collection.name.toLowerCase() === name)[ 0 ]; | ||
// console.log({toPopulate,reference,refpath,name}) | ||
let nestedIndex = 0; | ||
@@ -202,0 +204,0 @@ let entityPath = refpath.substring(0, refpath.indexOf('.ref')); |
{ | ||
"name": "lowkie", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6200064
38047