Skip to content

fix: remove await connection() workaround on 404 pages #2425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: integrations/makeswift
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/evil-dogs-shine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Remove `await connection()` workaround on 404 pages
4 changes: 0 additions & 4 deletions core/lib/makeswift/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { notFound } from 'next/navigation';
import { connection } from 'next/server';

import { getPageSnapshot } from './client';
import { MakeswiftPageShim } from './makeswift-page-shim';
Expand All @@ -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();
}

Expand Down