Move predicate variable closer to where it's used

This commit is contained in:
Robert
2023-07-12 13:50:31 +01:00
parent 39d53f469f
commit 8432f6cdfe

View File

@@ -137,11 +137,6 @@ export const MethodRow = ({
});
}, [externalApiUsage]);
const predicate =
modeledMethod?.type && modeledMethod.type !== "none"
? extensiblePredicateDefinitions[modeledMethod.type]
: undefined;
const showModelTypeCell =
!externalApiUsage.supported ||
(modeledMethod && modeledMethod?.type !== "none");
@@ -183,6 +178,10 @@ export const MethodRow = ({
[argumentsList],
);
const predicate =
modeledMethod?.type && modeledMethod.type !== "none"
? extensiblePredicateDefinitions[modeledMethod.type]
: undefined;
const showKindCell = predicate?.supportedKinds;
return (