@fourlights/strapi-plugin-deep-populate 1.11.0 → 1.11.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.js +8 -2
- package/dist/server/index.mjs +8 -2
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -18518,7 +18518,7 @@ const register = async ({ strapi: strapi2 }) => {
|
|
|
18518
18518
|
return result;
|
|
18519
18519
|
});
|
|
18520
18520
|
};
|
|
18521
|
-
const version = "1.11.
|
|
18521
|
+
const version = "1.11.1-beta.1";
|
|
18522
18522
|
const sanitizeObject = (obj) => {
|
|
18523
18523
|
if (obj === null || typeof obj !== "object") return obj;
|
|
18524
18524
|
const dangerousProps = ["__proto__", "constructor", "prototype"];
|
|
@@ -18760,7 +18760,13 @@ async function _populate({
|
|
|
18760
18760
|
...params
|
|
18761
18761
|
}) {
|
|
18762
18762
|
const newPopulate = {};
|
|
18763
|
-
|
|
18763
|
+
const model = strapi.getModel(schema2);
|
|
18764
|
+
if (!model) {
|
|
18765
|
+
strapi.log.warn(`[Plugin: Deep Populate] Could not find model for contentType: '${schema2}'`);
|
|
18766
|
+
strapi.log.warn("Please create a bug report and share the troublesome contentType.");
|
|
18767
|
+
return {};
|
|
18768
|
+
}
|
|
18769
|
+
let relations = getRelations(model);
|
|
18764
18770
|
let currentPopulate = cloneDeep__default.default(populate2);
|
|
18765
18771
|
resolvedRelations.set(params.documentId, true);
|
|
18766
18772
|
for (const [attrName, attr] of relations) {
|
package/dist/server/index.mjs
CHANGED
|
@@ -18490,7 +18490,7 @@ const register = async ({ strapi: strapi2 }) => {
|
|
|
18490
18490
|
return result;
|
|
18491
18491
|
});
|
|
18492
18492
|
};
|
|
18493
|
-
const version = "1.11.
|
|
18493
|
+
const version = "1.11.1-beta.1";
|
|
18494
18494
|
const sanitizeObject = (obj) => {
|
|
18495
18495
|
if (obj === null || typeof obj !== "object") return obj;
|
|
18496
18496
|
const dangerousProps = ["__proto__", "constructor", "prototype"];
|
|
@@ -18732,7 +18732,13 @@ async function _populate({
|
|
|
18732
18732
|
...params
|
|
18733
18733
|
}) {
|
|
18734
18734
|
const newPopulate = {};
|
|
18735
|
-
|
|
18735
|
+
const model = strapi.getModel(schema2);
|
|
18736
|
+
if (!model) {
|
|
18737
|
+
strapi.log.warn(`[Plugin: Deep Populate] Could not find model for contentType: '${schema2}'`);
|
|
18738
|
+
strapi.log.warn("Please create a bug report and share the troublesome contentType.");
|
|
18739
|
+
return {};
|
|
18740
|
+
}
|
|
18741
|
+
let relations = getRelations(model);
|
|
18736
18742
|
let currentPopulate = cloneDeep$1(populate2);
|
|
18737
18743
|
resolvedRelations.set(params.documentId, true);
|
|
18738
18744
|
for (const [attrName, attr] of relations) {
|
package/package.json
CHANGED