mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-28 17:18:46 +00:00
Better behavior of number input fields
This commit is contained in:
@@ -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)}`)
|
||||
|
||||
Reference in New Issue
Block a user