From 04e03541ea76c9093962a3e115e14aa67664e855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Tue, 4 Feb 2025 11:25:24 -0800 Subject: [PATCH] Escape useID to avoid jsdom SyntaxError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- src/hooks/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/utils.js b/src/hooks/utils.js index b2c583c9..2e6f13af 100644 --- a/src/hooks/utils.js +++ b/src/hooks/utils.js @@ -92,7 +92,7 @@ const useElementIds = inputId, }) { // Avoid conditional useId call - const reactId = `downshift-${React.useId()}` + const reactId = `downshift-${CSS.escape(React.useId())}` if (!id) { id = reactId }