Skip to content

Commit

Permalink
fix(react-components): color overlay crashes when pointcloud in scene (
Browse files Browse the repository at this point in the history
…#4250)

* fix(react-components): don't crash rule-based coloring with PC in scene

---------

Co-authored-by: Daniel Priori <[email protected]>
  • Loading branch information
haakonflatval-cognite and danpriori authored Feb 23, 2024
1 parent 2d8a60b commit 0ccd467
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ export function RuleBasedOutputsSelector({ ruleSet }: ColorOverlayProps): ReactE
.map((item) => item.assets)
.flat() ?? [];

// ========= Generate Rule Based Outputs
generateRuleBasedOutputs(model, contextualizedAssetNodes, flatMappings, ruleSet);
};

models.forEach((model) => {
void initializeRuleBasedOutputs(model as CogniteCadModel);
if (!(model instanceof CogniteCadModel)) {
return;
}
void initializeRuleBasedOutputs(model);
});
}, [assetMappings, ruleSet, models]);

Expand Down

0 comments on commit 0ccd467

Please sign in to comment.