fix TypeError: Cannot read property '_id' of null

https://github.com/steedos/steedos-project-hbport/issues/775
This commit is contained in:
孙浩林 2024-08-21 16:00:02 +08:00
parent 290c018c03
commit e1be21d540

View File

@ -139,6 +139,10 @@ const beforeUpdateBase = async function () {
}
const afterDeleteBase = async function () {
const { object_name, previousDoc } = this;
if (!previousDoc) {
return;
}
const object = objectql.getObject(object_name);
const objectConfig = object.toConfig();
const fields = objectConfig.fields;