From e931778b9340f39560a45e47a1052826476f4941 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 7 Jul 2019 09:59:51 +1200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20refactor=20`#writeFileBas?= =?UTF-8?q?e`=20to=20be=20compatible=20w/=20`strictNullChecks`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/volume.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/volume.ts b/src/volume.ts index 11ea97a7..ed7be35c 100644 --- a/src/volume.ts +++ b/src/volume.ts @@ -1230,13 +1230,13 @@ export class Volume { let offset = 0; let length = buf.length; - let position = flagsNum & O_APPEND ? null : 0; + let position = flagsNum & O_APPEND ? undefined : 0; try { while (length > 0) { const written = this.writeSync(fd, buf, offset, length, position); offset += written; length -= written; - if (position !== null) position += written; + if (position !== undefined) position += written; } } finally { if (!isUserFd) this.closeSync(fd);