Skip to content

Commit

Permalink
Fix for #165 (#167)
Browse files Browse the repository at this point in the history
* Fix for #165

Fix process.env

* prettier

---------

Co-authored-by: Bochkarev Artem <[email protected]>
  • Loading branch information
artemrsx and Bochkarev Artem authored Apr 19, 2024
1 parent e2c6aed commit 82b0ac2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import SweepEvent from "./sweep-event"
import SweepLine from "./sweep-line"

// Limits on iterative processes to prevent infinite loops - usually caused by floating-point math round-off errors.
const env =
typeof process !== "undefined" && typeof process.env !== "undefined"
? process.env
: {}
const POLYGON_CLIPPING_MAX_QUEUE_SIZE =
(typeof process !== "undefined" &&
process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE) ||
1000000
env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1000000
const POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS =
(typeof process !== "undefined" &&
process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS) ||
1000000
env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1000000

export class Operation {
run(type, geom, moreGeoms) {
Expand Down

0 comments on commit 82b0ac2

Please sign in to comment.