1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00

Fix type editing attachments

This commit is contained in:
Adria Navarro 2024-04-26 15:55:08 +02:00
parent 16ea4195df
commit a6d96cec4d

View file

@ -365,13 +365,11 @@
function getAllowedTypes() {
if (originalName) {
const possibleTypes = (
SWITCHABLE_TYPES[field.type] || [editableColumn.type]
).map(t => t.toLowerCase())
const possibleTypes = SWITCHABLE_TYPES[field.type] || [
editableColumn.type,
]
return Object.entries(FIELDS)
.filter(([fieldType]) =>
possibleTypes.includes(fieldType.toLowerCase())
)
.filter(([_, field]) => possibleTypes.includes(field.type))
.map(([_, fieldDefinition]) => fieldDefinition)
}