diff --git a/lib/line_wrapper.js b/lib/line_wrapper.js index d37817d..b3f97db 100644 --- a/lib/line_wrapper.js +++ b/lib/line_wrapper.js @@ -311,7 +311,7 @@ class LineWrapper extends EventEmitter { this.maxY = this.document.page.maxY(); this.document.x = this.startX; if (this.document._fillColor) { - this.document.fillColor(...(this.document._fillColor || [])); + this.document.fillColor(...this.document._fillColor); } this.emit('pageBreak', options, this); } else { diff --git a/lib/path.js b/lib/path.js index ddde05e..ca12717 100644 --- a/lib/path.js +++ b/lib/path.js @@ -147,7 +147,7 @@ const runners = { cy = a[5]; px = a[2]; py = a[3]; - return doc.bezierCurveTo(...(a || [])); + return doc.bezierCurveTo(...a); }, c(doc, a) { @@ -314,8 +314,8 @@ const solveArc = function(doc, x, y, coords) { const segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y); for (let seg of segs) { - const bez = segmentToBezier(...(seg || [])); - doc.bezierCurveTo(...(bez || [])); + const bez = segmentToBezier(...seg); + doc.bezierCurveTo(...bez); } };