Merge branch 'master' into sqs-auto-tests

This commit is contained in:
Michael Drury 2024-04-26 15:27:59 +01:00 committed by GitHub
commit c6b91bbb72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

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)
}

View File

@ -8,6 +8,10 @@ const isBetterSample = (newValue, oldValue) => {
return true
}
if (oldValue != null && newValue == null) {
return false
}
// Don't change type
const oldType = typeof oldValue
const newType = typeof newValue