From 3f21030af36d6d970766df7f7b2c74bd315c90bd Mon Sep 17 00:00:00 2001 From: Harshita Bandlamudi Date: Wed, 8 Dec 2021 16:19:03 -0800 Subject: [PATCH] Updating HRA with bug fix for non AEC models in Playgrounf --- client/pages/Playground.jsx | 11 ++++++++--- package.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/pages/Playground.jsx b/client/pages/Playground.jsx index 3b36e50..a3ad989 100644 --- a/client/pages/Playground.jsx +++ b/client/pages/Playground.jsx @@ -120,9 +120,14 @@ function Playground(props) { doNotCreateUI: true, }); } - const floorData = levelsExt.floorSelector.floorData; - const floor = floorData[0]; - levelsExt.floorSelector.selectFloor(floor.index, true); + + if (levelsExt && levelsExt.floorSelector) { + const floorData = levelsExt.floorSelector.floorData; + if (floorData && floorData.length) { + const floor = floorData[0]; + levelsExt.floorSelector.selectFloor(floor.index, true); + } + } // Model Structure Info let dataHelper = new DataHelper(); diff --git a/package.json b/package.json index 1e20517..5f8f268 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forge-dataviz-iot-reference-app", - "version": "0.3.2", + "version": "0.3.3", "description": "Autodesk Forge Viewer Data Visualization Sample Application", "main": "server/localserver.js", "scripts": {