Skip to content

Commit

Permalink
fix(): strict ancestors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Apr 10, 2022
1 parent af3430c commit 67abe2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mixins/object_stacking.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
if (this === other) {
return undefined;
}
var ancestors = this.getAncestors().reverse().concat(this);
var otherAncestors = other.getAncestors().reverse().concat(other);
var ancestors = this.getAncestors(true).reverse().concat(this);
var otherAncestors = other.getAncestors(true).reverse().concat(other);
var i, j, found = false;
// find the common ancestor
for (i = 0; i < ancestors.length; i++) {
Expand Down

0 comments on commit 67abe2f

Please sign in to comment.