Skip to content

Commit 5414edf

Browse files
committed
Replace unsupported characters before passing to ARIA id
1 parent 0c6cb05 commit 5414edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-resizable-panels/src/hooks/useUniqueId.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let counter = 0;
88
export default function useUniqueId(
99
idFromParams: string | null = null
1010
): string {
11-
const idFromUseId = wrappedUseId();
11+
const idFromUseId = wrappedUseId()?.replace(":", "-");
1212

1313
const idRef = useRef<string | null>(idFromParams || idFromUseId || null);
1414
if (idRef.current === null) {

0 commit comments

Comments
 (0)