mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
add entity id in list of components
This commit is contained in:
parent
be2a2563ba
commit
d5ae2f97a9
@ -110,7 +110,8 @@ const getComponents = async (uid, entity) => {
|
|||||||
const componentAttributes = getComponentAttributes(strapi.getModel(uid));
|
const componentAttributes = getComponentAttributes(strapi.getModel(uid));
|
||||||
|
|
||||||
if (_.isEmpty(componentAttributes)) return {};
|
if (_.isEmpty(componentAttributes)) return {};
|
||||||
return strapi.query(uid).load(entity, componentAttributes);
|
const components = strapi.query(uid).load(entity, componentAttributes);
|
||||||
|
return { id: entity?.id, ...components };
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user