From ff0c5090c5a1237ad90bbdc52fcb10078a6df479 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Fri, 8 Nov 2024 22:51:48 +0100 Subject: [PATCH] fix error from Piwik when adBlocker is used --- docs/src/components/Interpreter/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/components/Interpreter/index.tsx b/docs/src/components/Interpreter/index.tsx index fb98b2a1..23909d02 100644 --- a/docs/src/components/Interpreter/index.tsx +++ b/docs/src/components/Interpreter/index.tsx @@ -17,7 +17,9 @@ export interface TerminalProps extends CSSProperties { function track(type: string, command: string) { const _paq = globalThis._paq as PiwikTrack; - _paq.push(['trackEvent', 'REPL', type, command]); + if (_paq) { + _paq.push(['trackEvent', 'REPL', type, command]); + } } type PiwikTrack = Array>;