From 1f1e2ce76a32388d1b20de18a839951195f5c45f Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Sun, 16 Jun 2024 21:14:50 -0600 Subject: [PATCH] Allow using RichText after assertion are turned on --- js/nodes/Node.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/nodes/Node.ts b/js/nodes/Node.ts index b5256f4c2..94aef93c6 100644 --- a/js/nodes/Node.ts +++ b/js/nodes/Node.ts @@ -1572,10 +1572,10 @@ class Node extends ParallelDOM { } if ( assert ) { - assert( this._originalBounds === this.boundsProperty._value, 'Reference for bounds changed!' ); - assert( this._originalLocalBounds === this.localBoundsProperty._value, 'Reference for localBounds changed!' ); - assert( this._originalSelfBounds === this.selfBoundsProperty._value, 'Reference for selfBounds changed!' ); - assert( this._originalChildBounds === this.childBoundsProperty._value, 'Reference for childBounds changed!' ); + assert( !this._originalBounds || this._originalBounds === this.boundsProperty._value, 'Reference for bounds changed!' ); + assert( !this._originalLocalBounds || this._originalLocalBounds === this.localBoundsProperty._value, 'Reference for localBounds changed!' ); + assert( !this._originalSelfBounds || this._originalSelfBounds === this.selfBoundsProperty._value, 'Reference for selfBounds changed!' ); + assert( !this._originalChildBounds || this._originalChildBounds === this.childBoundsProperty._value, 'Reference for childBounds changed!' ); } // double-check that all of our bounds handling has been accurate