From 689160e83303f72261bc875c8eaece7fee2bc970 Mon Sep 17 00:00:00 2001 From: calebboyd Date: Fri, 28 Sep 2018 14:40:50 -0500 Subject: [PATCH] fix: handle empty content when adding an empty file --- src/fs/bundle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/bundle.ts b/src/fs/bundle.ts index 6c886f3..a03a76d 100644 --- a/src/fs/bundle.ts +++ b/src/fs/bundle.ts @@ -42,7 +42,7 @@ export class Bundle { async addResource(absoluteFileName: string, content?: Buffer | string) { let length = 0 - if (content) { + if (content !== undefined) { length = Buffer.byteLength(content) } else { const stats = await stat(absoluteFileName)