fix(databases): treat empty format as no format in enum icon lookup

Mirrors the truthiness guard already used in columns/+page.svelte, so
an empty-string format from the API falls back to undefined instead of
failing to match any option and dropping the icon.
This commit is contained in:
harsh mahajan committed 2026-07-10 11:32:59 +05:30
1 parent ca5f703f57
commit 8f67efbbde
1 file changed
+2 -1
@@ -60,7 +60,8 @@
leadingIcon: baseColumnOptions.find(
(option) =>
option.type === field.type &&
option.format === ('format' in field ? field.format : undefined)
option.format ===
('format' in field && field.format ? field.format : undefined)
)?.icon
}))
);