Fix formatting

Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
Stephen Glass
2024-06-28 01:18:20 -04:00
parent 19d495939d
commit 7193d02b32
@@ -46,10 +46,7 @@ function flattenObject(
const backstageReviewOptions = definitionInSchema['ui:backstage']?.review;
// Recurse into nested objects
if (
backstageReviewOptions?.explode &&
isJsonObject(value)
) {
if (backstageReviewOptions?.explode && isJsonObject(value)) {
return flattenObject(value, prefixedKey, schema, formState);
}
}
@@ -59,11 +56,7 @@ function flattenObject(
}
function isJsonObject(value?: JsonValue): value is JsonObject {
return (
typeof value === 'object' &&
value !== null &&
!Array.isArray(value)
);
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
/**
@@ -92,10 +85,7 @@ export const ReviewState = (props: ReviewStateProps) => {
if (backstageReviewOptions.show === false) {
return [];
}
if (
backstageReviewOptions.explode &&
isJsonObject(value)
) {
if (backstageReviewOptions.explode && isJsonObject(value)) {
return flattenObject(value, key, parsedSchema, props.formState);
}
}
@@ -109,7 +99,7 @@ export const ReviewState = (props: ReviewStateProps) => {
[
key,
definitionInSchema.enumNames[
definitionInSchema.enum.indexOf(value)
definitionInSchema.enum.indexOf(value)
] || value,
],
];