1
0
mirror of https://github.com/XFox111/TabsAsideExtension.git synced 2026-04-22 07:58:01 +03:00

hotfix: wrapped analytics into try/catch to prevent failing on firefox

This commit is contained in:
2025-05-07 00:03:43 +03:00
parent f5bf0db039
commit 8b77159abe
10 changed files with 43 additions and 18 deletions
@@ -1,4 +1,5 @@
import { getCollectionTitle } from "@/entrypoints/sidepanel/utils/getCollectionTitle";
import { track } from "@/features/analytics";
import { useGroupColors } from "@/hooks/useGroupColors";
import { CollectionItem, GroupItem } from "@/models/CollectionModels";
import * as fui from "@fluentui/react-components";
@@ -27,9 +28,9 @@ export default function EditDialog(props: GroupEditDialogProps): ReactElement
const handleSave = () =>
{
if (props.type === "collection" ? props.collection !== null : props.group !== null)
analytics.track("item_edited", { type: props.type });
track("item_edited", { type: props.type });
else
analytics.track("item_created", { type: props.type });
track("item_created", { type: props.type });
if (props.type === "collection")
props.onSave({