mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-18 05:25:08 +00:00
handle unspecified type in sapper export
This commit is contained in:
@@ -41,7 +41,7 @@ export default function exporter({ src, dest }) { // TODO dest is a terrible nam
|
|||||||
let dest = OUTPUT_DIR + pathname;
|
let dest = OUTPUT_DIR + pathname;
|
||||||
|
|
||||||
const type = res.headers.get('Content-Type');
|
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);
|
sander.writeFileSync(dest, body);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user