mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 13:55:08 -05:00
fix(ui): metadata display for primitive values
This commit is contained in:
@@ -101,7 +101,13 @@ const MetadataLabel = ({ i18nKey }: { i18nKey: string }) => {
|
||||
};
|
||||
|
||||
const MetadataPrimitiveValue = ({ value }: { value: string | number | boolean | null | undefined }) => {
|
||||
return <Text as="span">{value}</Text>;
|
||||
if (value === null || value === undefined) {
|
||||
return null;
|
||||
}
|
||||
if (isString(value)) {
|
||||
return <Text as="span">{value || '<empty string>'}</Text>;
|
||||
}
|
||||
return <Text as="span">{String(value)}</Text>;
|
||||
};
|
||||
|
||||
const getProperty = (obj: unknown, path: string): unknown => {
|
||||
|
||||
Reference in New Issue
Block a user