diff --git a/packages/core/admin/ee/server/utils/persisted-tables.js b/packages/core/admin/ee/server/utils/persisted-tables.js index bd6e89fcfb..698350ab9c 100644 --- a/packages/core/admin/ee/server/utils/persisted-tables.js +++ b/packages/core/admin/ee/server/utils/persisted-tables.js @@ -92,13 +92,15 @@ async function removePersistedTables({ strapi }, tableNames) { * @param {Strapi} ctx.strapi * @returns {Promise} */ -const getPersistedTables = async ({ strapi }) => - ( - await strapi.store.get({ - type: 'core', - key: 'persisted_tables', - }) - ).map(transformTableName) ?? []; + +async function getPersistedTables({ strapi }) { + const persistedTables = await strapi.store.get({ + type: 'core', + key: 'persisted_tables', + }); + + return (persistedTables || []).map(transformTableName); +} /** * Add all table names that start with a prefix to the reserved tables in