diff --git a/lib/internal/streams/buffer_list.js b/lib/internal/streams/buffer_list.js index 2dc803d6fa0425..5279f65b4bdd23 100644 --- a/lib/internal/streams/buffer_list.js +++ b/lib/internal/streams/buffer_list.js @@ -57,7 +57,7 @@ module.exports = class BufferList { return ''; let p = this.head; let ret = '' + p.data; - while (p = p.next) + while ((p = p.next) !== null) ret += s + p.data; return ret; } @@ -129,7 +129,7 @@ module.exports = class BufferList { break; } ++c; - } while (p = p.next); + } while ((p = p.next) !== null); this.length -= c; return ret; } @@ -163,7 +163,7 @@ module.exports = class BufferList { break; } ++c; - } while (p = p.next); + } while ((p = p.next) !== null); this.length -= c; return ret; }