Skip to content

Commit

Permalink
fixed graphics stroke error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhefengzhang committed Dec 30, 2019
1 parent 1978177 commit fdab164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos2d/core/renderer/webgl/assemblers/graphics/index.js
Expand Up @@ -465,7 +465,7 @@ export default class GraphicsAssembler extends Assembler {
let p0 = pts[pts.length - 1];
let p1 = pts[0];

if (p0.equals(p1)) {
if (pts.length > 2 && p0.equals(p1)) {
path.closed = true;
pts.pop();
p0 = pts[pts.length - 1];
Expand Down

0 comments on commit fdab164

Please sign in to comment.