fix(plugin-error-handler): no error message

This commit is contained in:
chenos 2022-07-25 23:24:18 +08:00
parent 9038d111ea
commit 8f64061e65

View File

@ -27,7 +27,7 @@ export class PluginErrorHandler extends Plugin {
const model = instance.constructor; const model = instance.constructor;
const collection = this.db.modelCollection.get(model); const collection = this.db.modelCollection.get(model);
const field = collection.getField(path); const field = collection.getField(path);
const fieldOptions = Schema.compile(field.options, { t: tFunc }); const fieldOptions = Schema.compile(field?.options, { t: tFunc });
const title = lodash.get(fieldOptions, 'uiSchema.title', path); const title = lodash.get(fieldOptions, 'uiSchema.title', path);
return title; return title;
}; };