fix clone/getZ when poly empty
This commit is contained in:
parent
daedae0d41
commit
aa0dacde13
1 changed files with 1 additions and 1 deletions
|
|
@ -965,7 +965,7 @@ class Polygon {
|
|||
* @returns {number} z value of first point
|
||||
*/
|
||||
getZ(i) {
|
||||
return this.z !== undefined ? this.z : this.points[i || 0].z;
|
||||
return this.z !== undefined ? this.z : this.points[i || 0]?.z || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue