Validate model loosly on load

This commit is contained in:
Misode
2020-11-30 02:09:30 +01:00
parent 5b7caff5e6
commit c5676cf182

View File

@@ -100,10 +100,9 @@ async function updateSchemas(version: string) {
if (schema) {
model.schema = schema
if (JSON.stringify(model.data) === '{}') {
model.data = schema.default()
model.reset(schema.default(), true)
model.history = [JSON.stringify(model.data)]
model.historyIndex = 0
model.silentInvalidate()
}
}
})