chore(viewer): adds logger for the case, as per king alex's request

This commit is contained in:
Dimitrie Stefanescu
2024-08-06 10:26:53 +01:00
parent ded5e12279
commit 79fc523d9c
@@ -608,7 +608,12 @@ export default class SpeckleConverter {
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
if (!speckleData) {
Logger.warn(
`Object ${objectApplicationId} is is missing from definition ${definitionId}. Someone probably sent an instance containing unsopprted elements - this is ok, do not panic.`
)
continue
}
const instancedNode = this.tree.parse({
id: this.getCompoundId(speckleData.id, this.instanceCounter++),
raw: speckleData,