Skip to content

Commit

Permalink
fix Vertices.chamfer radius argument, closes #467
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Nov 22, 2017
1 parent 18a0845 commit 3bceef4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/geometry/Vertices.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,11 @@ var Common = require('../core/Common');
* @param {number} qualityMax
*/
Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {
radius = radius || [8];

if (!radius.length)
if (typeof radius === 'number') {
radius = [radius];
} else {
radius = radius || [8];
}

// quality defaults to -1, which is auto
quality = (typeof quality !== 'undefined') ? quality : -1;
Expand Down

0 comments on commit 3bceef4

Please sign in to comment.