@@ -56,7 +56,7 @@ export function useRowScript(modal: ModalAction, dataID: string) {
title: text,
okText: '确定',
cancelText: '取消',
- initialValues: { parentID: record.parentID || record.ID },
+ initialValues: { parentID: record?.parentID || record?.ID },
type: 'form',
children: (
<ProForm submitter={false} layout="horizontal" labelCol={{ span: 5 }} isKeyPressSubmit>