Skip to content

Commit

Permalink
fix error from Piwik when adBlocker is used
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Nov 8, 2024
1 parent b235894 commit ff0c509
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/components/Interpreter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Array<string>>;
Expand Down

0 comments on commit ff0c509

Please sign in to comment.