Merge pull request #546 from DavidQinqianWu/fix-error-message-on-no-prototype-builtins

fix: fix error message about "no-prototype-builtins" after run project
master
Archer 1 year ago committed by GitHub
commit 9af5c99c2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -161,7 +161,7 @@ export const initModel = (schema: FormSchema[], formModel: Recordable) => {
// 如果 schema 对应的 field 不存在,则删除 model 中的对应的 field
for (let i = 0; i < schema.length; i++) {
const key = schema[i].field
if (!model.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(model, key)) {
delete model[key]
}
}

Loading…
Cancel
Save