Skip to content

Commit

Permalink
fix "can't read origin of undefined" - fixes #417
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Sep 18, 2023
1 parent a099e98 commit 29270b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/structs/Item.js
Expand Up @@ -389,9 +389,8 @@ export class Item extends AbstractStruct {
}
if ((this.left && this.left.constructor === GC) || (this.right && this.right.constructor === GC)) {
this.parent = null
}
// only set parent if this shouldn't be garbage collected
if (!this.parent) {
} else if (!this.parent) {
// only set parent if this shouldn't be garbage collected
if (this.left && this.left.constructor === Item) {
this.parent = this.left.parent
this.parentSub = this.left.parentSub
Expand Down

0 comments on commit 29270b5

Please sign in to comment.