diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 333f6fd..f122a45 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -491,6 +491,7 @@ const startX = cx + (Math.cos(startAngle) * radius); const startY = cy + (Math.sin(startAngle) * radius); + // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path. let points = this.currentPath ? this.currentPath.shape.points : null; if (points) diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 333f6fd..f122a45 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -491,6 +491,7 @@ const startX = cx + (Math.cos(startAngle) * radius); const startY = cy + (Math.sin(startAngle) * radius); + // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path. let points = this.currentPath ? this.currentPath.shape.points : null; if (points) diff --git a/test/core/Graphics.js b/test/core/Graphics.js index 926bd59..4822108 100644 --- a/test/core/Graphics.js +++ b/test/core/Graphics.js @@ -129,10 +129,11 @@ }); }); - describe('complex drawing #1: draw triangle, rounder rect and an arc (issue #3433)', () => + describe('arc', () => { it('should not throw', () => { + // complex drawing #1: draw triangle, rounder rect and an arc (issue #3433) const graphics = new PIXI.Graphics(); // set a fill and line style