Skip to content

Commit

Permalink
fix(path): init data in appendData when is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Oct 10, 2024
1 parent e742715 commit de10c10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/PathProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ export default class PathProxy {
if (hasTypedArray && (this.data instanceof Float32Array)) {
this.data = new Float32Array(offset + appendSize);
}
else if (this.data == null) {
this.data = [];
}
for (let i = 0; i < len; i++) {
const appendPathData = path[i].data;
for (let k = 0; k < appendPathData.length; k++) {
Expand Down

0 comments on commit de10c10

Please sign in to comment.