From 165ad0c712163d9b20316d86c15799f2de4ade68 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Mon, 18 Mar 2024 16:01:28 +0100 Subject: [PATCH] fix: flatten import --- .changeset/rare-flowers-matter.md | 5 +++++ packages/postgrest-core/src/filter/denormalize.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/rare-flowers-matter.md diff --git a/.changeset/rare-flowers-matter.md b/.changeset/rare-flowers-matter.md new file mode 100644 index 00000000..98767b0c --- /dev/null +++ b/.changeset/rare-flowers-matter.md @@ -0,0 +1,5 @@ +--- +"@supabase-cache-helpers/postgrest-core": patch +--- + +fix: flatten import diff --git a/packages/postgrest-core/src/filter/denormalize.ts b/packages/postgrest-core/src/filter/denormalize.ts index 7e2d8aa8..13d317c2 100644 --- a/packages/postgrest-core/src/filter/denormalize.ts +++ b/packages/postgrest-core/src/filter/denormalize.ts @@ -1,4 +1,4 @@ -import { unflatten } from 'flat'; +import flat from 'flat'; import { groupPathsRecursive, @@ -46,7 +46,7 @@ export const denormalize = >( {}, ); if (Object.keys(jsonValue).length > 0) { - value = unflatten(jsonValue); + value = flat.unflatten(jsonValue); } } if (typeof value === 'undefined') {