Skip to content

Commit

Permalink
squash: brevity check
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Jan 29, 2022
1 parent 6f1344b commit c292ab9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/internal/fs/utils.js
Expand Up @@ -884,15 +884,13 @@ const validateStringAfterArrayBufferView = hideStackFrames((buffer, name) => {
});

const validatePrimitiveStringAfterArrayBufferView = hideStackFrames((buffer, name) => {
if (typeof buffer === 'string') {
return;
if (typeof buffer !== 'string') {
throw new ERR_INVALID_ARG_TYPE(
name,
['string', 'Buffer', 'TypedArray', 'DataView'],
buffer
);
}

throw new ERR_INVALID_ARG_TYPE(
name,
['string', 'Buffer', 'TypedArray', 'DataView'],
buffer
);
});

const validatePosition = hideStackFrames((position, name) => {
Expand Down

0 comments on commit c292ab9

Please sign in to comment.