mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Remove redundant value existence checks
This commit is contained in:
parent
1228c259bd
commit
50dbed9401
@ -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 {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user