Fix error handling in FrameworkView component
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -42,8 +42,12 @@ function FrameworkViewContent({
|
||||
queryRef
|
||||
);
|
||||
|
||||
if (!data.node.firstControl) {
|
||||
return null;
|
||||
if (!data?.node) {
|
||||
return <div>Framework not found</div>;
|
||||
}
|
||||
|
||||
if (!data.node.firstControl?.edges?.length) {
|
||||
return <div>No controls found for this framework</div>;
|
||||
}
|
||||
|
||||
return <Control controlKey={data.node.firstControl.edges[0].node} />;
|
||||
|
||||
Reference in New Issue
Block a user