From 83a4dc91aaa8eb92ebc1cc461abedbcd17cd89c5 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 23 Nov 2022 17:16:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dposthog=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF=E4=BC=9A=E6=8A=9B?= =?UTF-8?q?=E5=87=BA=E5=BC=82=E5=B8=B8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/web/plugins/com.msgbyte.posthog/src/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/web/plugins/com.msgbyte.posthog/src/index.tsx b/client/web/plugins/com.msgbyte.posthog/src/index.tsx index 85305f4b..ef1c6be1 100644 --- a/client/web/plugins/com.msgbyte.posthog/src/index.tsx +++ b/client/web/plugins/com.msgbyte.posthog/src/index.tsx @@ -13,16 +13,15 @@ console.log(`Plugin ${PLUGIN_NAME} is loaded`); setTimeout(() => { console.log('Report plugin install status'); - const storage = JSON.parse(window.localStorage['$TailchatInstalledPlugins']); try { + const storage = JSON.parse( + window.localStorage['$TailchatInstalledPlugins'] + ); posthog.capture('Report Plugin', { plugins: storage.rawData, pluginNum: Array.isArray(storage.rawData) ? storage.rawData.length : 0, }); } catch (err) { - posthog.capture('Report Plugin error', { - err: String(err), - storage, - }); + // Ignore error } }, 2000);