diff --git a/frontend/src/components/StdDataDisplay/StdCurd.vue b/frontend/src/components/StdDataDisplay/StdCurd.vue index f9990b92..99fab168 100644 --- a/frontend/src/components/StdDataDisplay/StdCurd.vue +++ b/frontend/src/components/StdDataDisplay/StdCurd.vue @@ -93,7 +93,7 @@ function clear_error() { const ok = async () => { clear_error() - await props.beforeSave(data) + await props?.beforeSave?.(data) props.api!.save(data.id, data).then((r: any) => { message.success($gettext('Save Successfully')) Object.assign(data, r) @@ -131,13 +131,13 @@ function edit(id: any) {