mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 05:52:08 +00:00
remove unnecessary isEmpty
This commit is contained in:
parent
38ed957224
commit
cee7eb12f2
@ -242,9 +242,7 @@ const createDefaultImplementation = ({ strapi, db, eventHub, entityValidator })
|
|||||||
);
|
);
|
||||||
|
|
||||||
const deletedEntities = await db.query(uid).deleteMany(query);
|
const deletedEntities = await db.query(uid).deleteMany(query);
|
||||||
await Promise.all(
|
await Promise.all(componentsToDelete.map((compos) => deleteComponents(uid, compos)));
|
||||||
componentsToDelete.map((compos) => !_.isEmpty(compos) && deleteComponents(uid, compos))
|
|
||||||
);
|
|
||||||
|
|
||||||
// Trigger webhooks. One for each entity
|
// Trigger webhooks. One for each entity
|
||||||
await Promise.all(entitiesToDelete.map((entity) => this.emitEvent(uid, ENTRY_DELETE, entity)));
|
await Promise.all(entitiesToDelete.map((entity) => this.emitEvent(uid, ENTRY_DELETE, entity)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user