From 863d24b2ffa2d35660105224b4f7d813440ae992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Gonz=C3=A1lez=20Viegas?= Date: Wed, 31 Jul 2024 17:03:27 +0200 Subject: [PATCH] fix(front): correct streamer error when deleted non-streamed model --- packages/front/package.json | 2 +- packages/front/src/fragments/IfcStreamer/index.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/front/package.json b/packages/front/package.json index 93b6b085c..bdf8333de 100644 --- a/packages/front/package.json +++ b/packages/front/package.json @@ -1,7 +1,7 @@ { "name": "@thatopen/components-front", "description": "Collection of frontend tools to author BIM apps.", - "version": "2.1.12", + "version": "2.1.13", "author": "That Open Company", "contributors": [ "Antonio Gonzalez Viegas (https://github.com/agviegas)", diff --git a/packages/front/src/fragments/IfcStreamer/index.ts b/packages/front/src/fragments/IfcStreamer/index.ts index 1ae53e190..2ce116585 100644 --- a/packages/front/src/fragments/IfcStreamer/index.ts +++ b/packages/front/src/fragments/IfcStreamer/index.ts @@ -702,6 +702,10 @@ export class IfcStreamer extends OBC.Component implements OBC.Disposable { const { groupID, fragmentIDs } = data; + if (!this.models[groupID]) { + return; + } + delete this.models[groupID]; delete this._geometryInstances[groupID]; delete this._loadedFragments[groupID];