From 0420327d945e8a48309516d26486c36d921ae3cf Mon Sep 17 00:00:00 2001 From: Alec Aivazis Date: Fri, 3 Feb 2023 15:24:54 -0800 Subject: [PATCH] better behavior for fspatch --- packages/houdini-svelte/src/plugin/fsPatch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/houdini-svelte/src/plugin/fsPatch.ts b/packages/houdini-svelte/src/plugin/fsPatch.ts index b55deb926a..e2b1ecb2dc 100644 --- a/packages/houdini-svelte/src/plugin/fsPatch.ts +++ b/packages/houdini-svelte/src/plugin/fsPatch.ts @@ -228,7 +228,9 @@ filesystemPromises.readFile = async (path, options): Promise => { try { return await _readFile(path, options) } catch { - return '' + return typeof options === 'string' || options?.encoding + ? empty_layout + : Buffer.from(empty_layout) } }