Remove redundant value existence checks

This commit is contained in:
Luiz Américo 2019-06-12 21:48:54 -03:00
parent 1228c259bd
commit 50dbed9401
2 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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);
}
};