From dfb8692d780fd14da35d5f37ef07375c6be1ecd8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 3 Feb 2018 13:56:14 -0500 Subject: [PATCH] handle unspecified type in sapper export --- src/core/export.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/export.ts b/src/core/export.ts index 069c232..c229f80 100644 --- a/src/core/export.ts +++ b/src/core/export.ts @@ -41,7 +41,7 @@ export default function exporter({ src, dest }) { // TODO dest is a terrible nam let dest = OUTPUT_DIR + pathname; const type = res.headers.get('Content-Type'); - if (type.startsWith('text/html')) dest += '/index.html'; + if (type && type.startsWith('text/html')) dest += '/index.html'; sander.writeFileSync(dest, body);