mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
补充容错 (#2059)
This commit is contained in:
parent
d1a4cad499
commit
df1a4bb54b
@ -124,6 +124,11 @@ export function renderChild(
|
||||
}
|
||||
|
||||
const typeofnode = typeof node;
|
||||
|
||||
if (typeofnode === 'undefined' || node === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let schema: Schema =
|
||||
typeofnode === 'string' || typeofnode === 'number'
|
||||
? {type: 'tpl', tpl: String(node)}
|
||||
|
@ -489,7 +489,7 @@ addSchemaFilter(function (schema: Schema, renderer: any, props: any) {
|
||||
return schema;
|
||||
|
||||
function controlToNormalRenderer(item: any) {
|
||||
if (item.$ref && props.resolveDefinitions) {
|
||||
if (item?.$ref && props.resolveDefinitions) {
|
||||
item = {
|
||||
...props.resolveDefinitions(item.$ref),
|
||||
...item
|
||||
|
@ -811,6 +811,10 @@ export default class Form extends React.Component<FormProps, object> {
|
||||
) {
|
||||
const {store, formLazyChange} = this.props;
|
||||
|
||||
if (typeof name !== 'string') {
|
||||
return;
|
||||
}
|
||||
|
||||
store.changeValue(name, value, changePristine);
|
||||
|
||||
(formLazyChange === false ? this.emitChange : this.lazyEmitChange)(submit);
|
||||
|
Loading…
Reference in New Issue
Block a user