diff --git a/src/viewer/metadata/MetaModel.js b/src/viewer/metadata/MetaModel.js index d5d54bf8cf..5fef5b79d6 100644 --- a/src/viewer/metadata/MetaModel.js +++ b/src/viewer/metadata/MetaModel.js @@ -304,8 +304,8 @@ class MetaModel { for (let modelId in metaScene.metaModels) { const metaModel = metaScene.metaModels[modelId]; - for (let i = 0, len = metaModel.metaObjects.length; i < len; i++) { - const metaObject = metaModel.metaObjects[i]; + for (let objectId in metaModel.metaObjects) { + const metaObject = metaModel.metaObjects[objectId]; metaObject.metaModels.push(metaModel); } }