Skip to content

Commit

Permalink
fix: πŸ› refactor #newInoNumber to be compatible w/ strictNullChecks
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 6, 2019
1 parent 0bc4a15 commit e9ba56c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/volume.ts
Expand Up @@ -647,7 +647,9 @@ export class Volume {
}

private newInoNumber(): number {
if (this.releasedInos.length) return this.releasedInos.pop();
const releasedFd = this.releasedInos.pop();

if (releasedFd) return releasedFd;
else {
this.ino = (this.ino + 1) % 0xffffffff;
return this.ino;
Expand Down

0 comments on commit e9ba56c

Please sign in to comment.