From 03197910e823ea69e225bbf5ecc9de570610a129 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Fri, 13 Jun 2025 21:42:33 -0500 Subject: [PATCH] fix: remove `await connection()` workaround on 404 pages --- .changeset/evil-dogs-shine.md | 5 +++++ core/lib/makeswift/page.tsx | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .changeset/evil-dogs-shine.md diff --git a/.changeset/evil-dogs-shine.md b/.changeset/evil-dogs-shine.md new file mode 100644 index 0000000000..a255a56335 --- /dev/null +++ b/.changeset/evil-dogs-shine.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +Remove `await connection()` workaround on 404 pages diff --git a/core/lib/makeswift/page.tsx b/core/lib/makeswift/page.tsx index c67538fb7d..7e1d45344e 100644 --- a/core/lib/makeswift/page.tsx +++ b/core/lib/makeswift/page.tsx @@ -1,5 +1,4 @@ import { notFound } from 'next/navigation'; -import { connection } from 'next/server'; import { getPageSnapshot } from './client'; import { MakeswiftPageShim } from './makeswift-page-shim'; @@ -8,9 +7,6 @@ export async function Page({ path, locale }: { path: string; locale: string }) { const snapshot = await getPageSnapshot({ path, locale }); if (snapshot == null) { - // This is a temporary solution to fix the issue where non-published pages are not editable in the builder. - await connection(); - return notFound(); }