Skip to content

Commit

Permalink
Re-enabling negative buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelalmeida committed May 12, 2017
1 parent 3edbd0a commit 5a96f93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/turf-buffer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ var distanceToRadians = helpers.distanceToRadians;
module.exports = function (geojson, radius, units, steps) {
// validation
if (!geojson) throw new Error('geojson is required');
if (!radius) throw new Error('radius is required');
if (radius <= 0) throw new Error('radius must be greater than 0');
// Allow negative buffers ("erosion") or zero-sized buffers ("repair geometry")
if (radius === undefined) throw new Error('radius is required');
if (steps <= 0) throw new Error('steps must be greater than 0');

// prevent input mutation
Expand Down

0 comments on commit 5a96f93

Please sign in to comment.