From ca1ef1fb3a15fff9566c6cbb7173608938ed36f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Gonz=C3=A1lez=20Viegas?= Date: Thu, 24 Oct 2024 16:57:20 +0200 Subject: [PATCH] fix(core): add guard check for disposing simple planes --- packages/core/package.json | 2 +- packages/core/src/core/Clipper/src/simple-plane.ts | 3 +++ packages/core/src/core/Components/index.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 37b4d31e..bd50a46c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@thatopen/components", "description": "Collection of core functionalities to author BIM apps.", - "version": "2.3.11", + "version": "2.3.12", "author": "That Open Company", "contributors": [ "Antonio Gonzalez Viegas (https://github.com/agviegas)", diff --git a/packages/core/src/core/Clipper/src/simple-plane.ts b/packages/core/src/core/Clipper/src/simple-plane.ts index 4a99d6e3..2cc864be 100644 --- a/packages/core/src/core/Clipper/src/simple-plane.ts +++ b/packages/core/src/core/Clipper/src/simple-plane.ts @@ -72,6 +72,9 @@ export class SimplePlane implements Disposable, Hideable { * @param {boolean} state - The new enabled state. */ set enabled(state: boolean) { + if (this.world.isDisposing) { + return; + } if (!this.world.renderer) { throw new Error("No renderer found for clipping plane!"); } diff --git a/packages/core/src/core/Components/index.ts b/packages/core/src/core/Components/index.ts index 8dba42bf..827b4045 100644 --- a/packages/core/src/core/Components/index.ts +++ b/packages/core/src/core/Components/index.ts @@ -14,7 +14,7 @@ export class Components implements Disposable { /** * The version of the @thatopen/components library. */ - static readonly release = "2.3.11"; + static readonly release = "2.3.12"; /** {@link Disposable.onDisposed} */ readonly onDisposed = new Event();