Skip to content

Commit cb6a6cd

Browse files
committed
fix: remove await connection() workaround on 404 pages
1 parent f028691 commit cb6a6cd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.changeset/evil-dogs-shine.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bigcommerce/catalyst-core": patch
3+
---
4+
5+
Remove `await connection()` workaround on 404 pages

core/lib/makeswift/page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { notFound } from 'next/navigation';
2-
import { connection } from 'next/server';
32

43
import { getPageSnapshot } from './client';
54
import { MakeswiftPageShim } from './makeswift-page-shim';
@@ -8,9 +7,6 @@ export async function Page({ path, locale }: { path: string; locale: string }) {
87
const snapshot = await getPageSnapshot({ path, locale });
98

109
if (snapshot == null) {
11-
// This is a temporary solution to fix the issue where non-published pages are not editable in the builder.
12-
await connection();
13-
1410
return notFound();
1511
}
1612

0 commit comments

Comments
 (0)