1
0
mirror of synced 2024-11-29 00:26:12 +03:00

refactor: Decrease of code block nesting

This commit is contained in:
Zaytsev Kirill 2020-10-23 13:24:27 +03:00
parent 25a4f5530f
commit cd248b7678

View File

@ -148,7 +148,10 @@ export default class FormularioForm extends Vue {
const keys = Array.from(new Set([...Object.keys(values), ...Object.keys(this.proxy)]))
let proxyHasChanges = false
keys.forEach(field => {
if (this.registry.hasNested(field)) {
if (!this.registry.hasNested(field)) {
return
}
this.registry.getNested(field).forEach((registryField, registryKey) => {
const $input = this.registry.get(registryKey) as FormularioInput
const oldValue = getNested(this.proxy, registryKey)
@ -163,7 +166,6 @@ export default class FormularioForm extends Vue {
$input.context.model = newValue
}
})
}
})
this.initProxy()