From 02a9302f6946040846dc0cf598c9b64e0b363ec2 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 11 Aug 2023 04:04:46 -0400 Subject: [PATCH] fix: left might be GC --- src/structs/Item.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structs/Item.js b/src/structs/Item.js index 7e1bc92c..e4160391 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -427,9 +427,12 @@ export class Item extends AbstractStruct { if (this.parent) { if ((!this.left && (!this.right || this.right.left !== null)) || (this.left && this.left.right !== this.right)) { /** - * @type {Item|null} + * @type {GC|Item|null} */ let left = this.left + if (left && left.constructor === GC) { + left = null + } /** * @type {Item|null}