Fix type editing attachments
This commit is contained in:
parent
16ea4195df
commit
a6d96cec4d
|
@ -365,13 +365,11 @@
|
||||||
|
|
||||||
function getAllowedTypes() {
|
function getAllowedTypes() {
|
||||||
if (originalName) {
|
if (originalName) {
|
||||||
const possibleTypes = (
|
const possibleTypes = SWITCHABLE_TYPES[field.type] || [
|
||||||
SWITCHABLE_TYPES[field.type] || [editableColumn.type]
|
editableColumn.type,
|
||||||
).map(t => t.toLowerCase())
|
]
|
||||||
return Object.entries(FIELDS)
|
return Object.entries(FIELDS)
|
||||||
.filter(([fieldType]) =>
|
.filter(([_, field]) => possibleTypes.includes(field.type))
|
||||||
possibleTypes.includes(fieldType.toLowerCase())
|
|
||||||
)
|
|
||||||
.map(([_, fieldDefinition]) => fieldDefinition)
|
.map(([_, fieldDefinition]) => fieldDefinition)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue