diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 2b63b4eb2e13f2..1ed15e28d50c7c 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1177,8 +1177,12 @@ console.log(Buffer.allocUnsafe(3).fill('\u0222')); // Prints: ``` -If `value` contains invalid characters, it is truncated; if no valid -fill data remains, no filling is performed: +If `value` contains invalid characters, it is truncated. + +If no valid fill data remains, then the buffer is either zero-filled or no +filling is performed, depending on the input type. That behavior is dictated by +compatibility reasons and was changed to throwing an exception in Node.js v10, +so it's not recommended to rely on that. ```js const buf = Buffer.allocUnsafe(5);