Skip to content

Commit

Permalink
feat(viewer): handles missing instance components gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
didimitrie committed Aug 5, 2024
1 parent 0212f86 commit ded5e12
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ export default class SpeckleConverter {
)
for (const objectApplicationId of objectApplicationIds) {
const speckleData = this.instancedObjectsLookupTable[objectApplicationId]
// NOTE: see https://linear.app/speckle/issue/CNX-115/viewer-handle-gracefully-instances-with-elements-that-failed-to
// This prevents the viewer not loading anything if a instance component is missing from its defintion. This is a likely scenario from connectors; even though we're guarding against it we'll never be able to fully enforce it.
if (!speckleData) continue
const instancedNode = this.tree.parse({
id: this.getCompoundId(speckleData.id, this.instanceCounter++),
raw: speckleData,
Expand Down

0 comments on commit ded5e12

Please sign in to comment.