fix: Partials not working on error pages (#2072)

This commit is contained in:
Marvin Hagemeister
2023-11-27 16:56:46 +01:00
committed by GitHub
parent 1294d455bc
commit a56ea283c8
5 changed files with 45 additions and 4 deletions
-4
View File
@@ -639,10 +639,6 @@ class NoPartialsError extends Error {}
* Apply partials from a HTML response
*/
export async function applyPartials(res: Response): Promise<void> {
if (!res.ok) {
throw new Error(partialErrorMessage);
}
const contentType = res.headers.get("Content-Type");
if (contentType !== "text/html; charset=utf-8") {
throw new Error(partialErrorMessage);