Skip to content

Commit 50e8b2e

Browse files
authored
Don't use next/server after (#3314)
1 parent 315717f commit 50e8b2e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

packages/gitbook/src/lib/waitUntil.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,9 @@ export async function waitUntil(promise: Promise<unknown>) {
6666
}
6767
}
6868

69-
if (GITBOOK_RUNTIME === 'vercel' && isV2()) {
70-
// @ts-expect-error - `after` is not exported by `next/server` in next 14
71-
const { after } = await import('next/server');
72-
if (typeof after === 'function') {
73-
after(() => promise);
74-
return;
75-
}
76-
}
77-
78-
await promise;
69+
await promise.catch((error) => {
70+
console.error('Ignored error in waitUntil', error);
71+
});
7972
}
8073

8174
/**

0 commit comments

Comments
 (0)