mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
fix: catch event error
This commit is contained in:
parent
ad58f4f567
commit
2790dfb7ac
@ -213,13 +213,13 @@ const Suggestion: React.FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function applyQuery(name: string): void {
|
function applyQuery(name: string): void {
|
||||||
sendAcceptSuggestionEvent();
|
|
||||||
onSubmit(name);
|
onSubmit(name);
|
||||||
|
sendAcceptSuggestionEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShuffleButtonClicked() {
|
function onShuffleButtonClicked() {
|
||||||
sendShuffleSuggestionEvent();
|
|
||||||
shuffle();
|
shuffle();
|
||||||
|
sendShuffleSuggestionEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -19,7 +19,9 @@ export function trackEvent({
|
|||||||
type?: string;
|
type?: string;
|
||||||
}) {
|
}) {
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
umami.trackEvent(value, type);
|
try {
|
||||||
|
umami && umami.trackEvent(value, type);
|
||||||
|
} catch (err) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user