Better behavior of number input fields

This commit is contained in:
Misode
2021-09-24 04:11:19 +02:00
parent 6e4850d5a9
commit d0d212f755
2 changed files with 9 additions and 10 deletions

View File

@@ -75,14 +75,13 @@ export async function getModel(version: VersionId, id: string): Promise<DataMode
}
try {
const schema = versionData.schemas.get(schemaName)
const model = new DataModel(schema, { wrapLists: true, verbose: true })
const model = new DataModel(schema, { wrapLists: true })
if (Models[id]) {
model.reset(Models[id].model.data, false)
} else {
model.validate(true)
model.history = [JSON.stringify(model.data)]
}
console.log(model.data)
Models[id] = { model, version }
} catch (e) {
throw new Error(`Cannot get generator "${id}" for version "${version}": ${message(e)}`)