Skip to content

Commit e25a078

Browse files
authored
broad-brush-helper.js -- niche error handle
1 parent 8ac521b commit e25a078

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/helper/blob-tools/broad-brush-helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,12 @@ class BroadBrushHelper {
301301
this.finalPath.closePath();
302302

303303
// Resolve self-crossings
304-
const newPath =
304+
const newPath = this.finalPath instanceof paper.Path ?
305305
this.finalPath
306306
.resolveCrossings()
307307
.reorient(true /* nonZero */, true /* clockwise */)
308308
.reduce({simplify: true});
309+
: this.finalPath;
309310
if (newPath !== this.finalPath) {
310311
newPath.copyAttributes(this.finalPath);
311312
newPath.fillColor = this.finalPath.fillColor;

0 commit comments

Comments
 (0)