Skip to content

Commit

Permalink
fix: πŸ› allow modeToNumber to be called w/ undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 6, 2019
1 parent 07c0b7a commit 336821d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/volume.ts
Expand Up @@ -456,7 +456,7 @@ function _modeToNumber(mode: TMode | undefined, def?): number | undefined {
return undefined;
}

function modeToNumber(mode: TMode, def?): number {
function modeToNumber(mode: TMode | undefined, def?): number {
const result = _modeToNumber(mode, def);
if (typeof result !== 'number' || isNaN(result)) throw new TypeError(ERRSTR.MODE_INT);
return result;
Expand Down

0 comments on commit 336821d

Please sign in to comment.