handle empty shells
This commit is contained in:
parent
714a91013d
commit
ca43ac369f
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@
|
||||||
* @returns {Polygon[]} array of top polygons
|
* @returns {Polygon[]} array of top polygons
|
||||||
*/
|
*/
|
||||||
Top.prototype.shellsAtDepth = function(depth) {
|
Top.prototype.shellsAtDepth = function(depth) {
|
||||||
return this.shells.filter(poly => poly.depth === depth);
|
return this.shells ? this.shells.filter(poly => poly.depth === depth) : [];
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ******************************************************************
|
/** ******************************************************************
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue