fix: enable tab and deleting tab page will result in an error (#2045)

This commit is contained in:
katherinehhh 2023-06-14 10:37:15 +08:00 committed by GitHub
parent 58840e5fab
commit af37e26640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ export const Page = (props) => {
const [loading, setLoading] = useState(false);
const [activeKey, setActiveKey] = useState(() => {
// @ts-ignore
return location?.query?.tab || Object.keys(fieldSchema.properties).shift();
return location?.query?.tab || Object.keys(fieldSchema.properties || {}).shift();
});
const [height, setHeight] = useState(0);