Skip to content

Commit

Permalink
Merge pull request antvis#470 from antvis/daily-fix
Browse files Browse the repository at this point in the history
fix: 添加空判断,防止报错
  • Loading branch information
dengfuping authored Apr 9, 2020
2 parents 81e5528 + 3fae57c commit ee4749a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/g-base/src/abstract/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ abstract class Element extends Base implements IElement {
const matrix = this.attr('matrix');
if (matrix) {
const invertMatrix = invert(matrix);
return multiplyVec2(invertMatrix, v);
if (invertMatrix) {
return multiplyVec2(invertMatrix, v);
}
}
return v;
}
Expand Down

0 comments on commit ee4749a

Please sign in to comment.