From dbfc7546d32dffec7b154ed4db8a0c839d68fbda Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 7 Jul 2019 00:24:23 +1200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20allow=20`flagsToNumber`?= =?UTF-8?q?=20to=20be=20called=20w/=20`undefined`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/volume.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/volume.ts b/src/volume.ts index b3b5c5b8..500c91ab 100644 --- a/src/volume.ts +++ b/src/volume.ts @@ -193,7 +193,7 @@ export type TFlagsCopy = | typeof constants.COPYFILE_FICLONE | typeof constants.COPYFILE_FICLONE_FORCE; -export function flagsToNumber(flags: TFlags): number { +export function flagsToNumber(flags: TFlags | undefined): number { if (typeof flags === 'number') return flags; if (typeof flags === 'string') {