chore: report error if collection not found

This commit is contained in:
Chareice 2024-04-07 12:09:51 +08:00
parent 06a9d008e3
commit 0bb421ac40
No known key found for this signature in database

View File

@ -27,6 +27,10 @@ export class PluginErrorHandler extends Plugin {
const collection = database.modelCollection.get(model);
if (!collection) {
return path;
}
const field = collection.getField(path);
const fieldOptions = Schema.compile(field?.options, { t: tFunc });
const title = lodash.get(fieldOptions, 'uiSchema.title', path);