mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not modify schema while iterating on it
This commit is contained in:
parent
815ff046ff
commit
6793a6bdc7
1 changed files with 5 additions and 4 deletions
|
@ -142,13 +142,14 @@ export class MutatingForm extends Form {
|
|||
slugKey: 'PropertyInput',
|
||||
labelKey: 'PropertyInput',
|
||||
}
|
||||
for (const [key, schema] of Object.entries(SCHEMA)) {
|
||||
if (schema.type === Boolean) {
|
||||
for (const [key, definition] of Object.entries(SCHEMA)) {
|
||||
const schema = Utils.CopyJSON(definition)
|
||||
if (definition.type === Boolean) {
|
||||
if (schema.nullable) schema.handler = 'NullableChoices'
|
||||
else schema.handler = 'Switch'
|
||||
} else if (schema.type === 'Text') {
|
||||
} else if (definition.type === 'Text') {
|
||||
schema.handler = 'Textarea'
|
||||
} else if (schema.type === Number) {
|
||||
} else if (definition.type === Number) {
|
||||
if (schema.step) schema.handler = 'Range'
|
||||
else schema.handler = 'IntInput'
|
||||
} else if (schema.choices) {
|
||||
|
|
Loading…
Reference in a new issue