Skip to content

buffer: fix Buffer.isEncoding() return value for empty string

For now the return value of Buffer.isEncoding('') is true which seems not the preferred behavior:

> Buffer.isEncoding('')
true

This PR is to fix this.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

Merge request reports

Loading