Skip to content

Commit

Permalink
usage reporting: fix typo in Buffer.byteLength argument (#5149)
Browse files Browse the repository at this point in the history
Fortunately, it appears that going back at least to Node 8, there's no
difference between passing "utf8", "uft8" (the typo), or no encoding argument,
so there's no bug here. But it's good to remove the typo (and later versions of
`@types/node` consider this to be an error).
  • Loading branch information
glasser committed Apr 30, 2021
1 parent 8d45c2e commit bd44a4c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -23,7 +23,7 @@ export function defaultSendOperationsAsTrace() {
// it.
max: Math.pow(2, 20),
length: (_val, key) => {
return (key && Buffer.byteLength(key, 'uft8')) || 0;
return (key && Buffer.byteLength(key)) || 0;
},
});

Expand Down

0 comments on commit bd44a4c

Please sign in to comment.