From b947b38280790b1d2be58d9bee6fab07a4eb93d9 Mon Sep 17 00:00:00 2001 From: Yannick Adam Date: Sat, 6 May 2023 11:11:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20TypeError=20when=20documen?= =?UTF-8?q?t.cookie=20is=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- developer-extension/src/panel/hooks/useSdkInfos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer-extension/src/panel/hooks/useSdkInfos.ts b/developer-extension/src/panel/hooks/useSdkInfos.ts index 26a4ed3118..83a743eaf0 100644 --- a/developer-extension/src/panel/hooks/useSdkInfos.ts +++ b/developer-extension/src/panel/hooks/useSdkInfos.ts @@ -50,7 +50,7 @@ async function getInfos(): Promise { ` const cookieRawValue = document.cookie .split(';') - .map(cookie => cookie.match(/(\\S*?)=(.*)/).slice(1)) + .map(cookie => cookie.match(/(\\S*?)=(.*)/)?.slice(1) || []) .find(([name, _]) => name === '_dd_s') ?.[1]