diff --git a/packages/core/admin/ee/server/utils/persisted-tables.js b/packages/core/admin/ee/server/utils/persisted-tables.js index c03194c892..3cb231af01 100644 --- a/packages/core/admin/ee/server/utils/persisted-tables.js +++ b/packages/core/admin/ee/server/utils/persisted-tables.js @@ -124,6 +124,9 @@ const persistTablesWithPrefix = async (tableNamePrefix) => { const removePersistedTablesWithSuffix = async (tableNameSuffix) => { const tableNameRegex = new RegExp(`.*${tableNameSuffix}$`); const tableNames = await findTables({ strapi }, tableNameRegex); + if (!tableNames.length) { + return; + } await removePersistedTables({ strapi }, tableNames); };