From b8d9289922cd0901b9026951afc3a6cfab393df8 Mon Sep 17 00:00:00 2001 From: Fran McDade Date: Wed, 29 Nov 2023 04:58:34 +1000 Subject: [PATCH] fix: fix seeding database for client-side data (#3798) (#3799) Co-authored-by: Fran McDade --- explorer/pages/[entityListType]/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/explorer/pages/[entityListType]/index.tsx b/explorer/pages/[entityListType]/index.tsx index 378869875..875f0904f 100644 --- a/explorer/pages/[entityListType]/index.tsx +++ b/explorer/pages/[entityListType]/index.tsx @@ -28,7 +28,7 @@ const seedDatabase = async function seedDatabase( // TODO get rid of this duplic entityListType: string, entityConfig: EntityConfig ): Promise { - const { entityMapper, label, staticLoadFile } = entityConfig; + const { label, staticLoadFile } = entityConfig; if (!staticLoadFile) { throw new Error(`staticLoadFile not found for entity entity ${label}`); @@ -42,9 +42,7 @@ const seedDatabase = async function seedDatabase( // TODO get rid of this duplic } const object = JSON.parse(rawData.toString()); - const entities = entityMapper - ? Object.values(object).map(entityMapper) - : Object.values(object); + const entities = Object.values(object); // Client-side fetched entities are mapped prior to dispatch to explore state. // Seed entities. database.get().seed(entityListType, entities);