We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f303049 commit 1154ce0Copy full SHA for 1154ce0
1 file changed
src/writer.js
@@ -519,11 +519,12 @@ WriterPrototype.ldelim = function ldelim() {
519
var head = this.head,
520
tail = this.tail,
521
len = this.len;
522
- this.reset()
523
- .uint32(len)
524
- .tail.next = head.next; // skip noop
525
- this.tail = tail;
526
- this.len += len;
+ this.reset().uint32(len);
+ if (len) {
+ this.tail.next = head.next; // skip noop
+ this.tail = tail;
+ this.len += len;
527
+ }
528
return this;
529
};
530
0 commit comments