Skip to content

Commit

Permalink
Prevent CurveLocation#toString() calls in bitwise xor comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
lehni committed Sep 22, 2016
1 parent dbe3aa4 commit d3ac1b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/path/PathItem.Boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,9 @@ PathItem.inject(new function() {
// the path.
return over1 ^ over2
? over1 ? 1 : -1
: inter1 ^ inter2
// NOTE: inter1 & 2 are objects, convert to boolean first
// as otherwise toString() is called on them.
: !inter1 ^ !inter2
? inter1 ? 1 : -1
// All other segments, also when comparing two overlaps
// or two intersections, are sorted by their order.
Expand Down

0 comments on commit d3ac1b4

Please sign in to comment.