Skip to content

Commit a0b41eb

Browse files
committed
fix: ensures unique document drawer slugs
1 parent de4c7ae commit a0b41eb

File tree

1 file changed

+2
-2
lines changed
  • src/admin/components/elements/DocumentDrawer

1 file changed

+2
-2
lines changed

src/admin/components/elements/DocumentDrawer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const formatDocumentDrawerSlug = ({
3333
collectionSlug: string,
3434
id: string,
3535
depth: number,
36-
uuid?: string, // supply when creating a new document and no id is available
37-
}) => `doc-drawer_${collectionSlug}_${depth}_${id || uuid || '0'}`;
36+
uuid: string, // supply when creating a new document and no id is available
37+
}) => `doc-drawer_${collectionSlug}_${depth}${id ? `_${id}` : ''}_${uuid}`;
3838

3939
export const DocumentDrawerToggler: React.FC<DocumentTogglerProps> = ({
4040
children,

0 commit comments

Comments
 (0)